Skip to content

Commit 2228151

Browse files
committed
chore: File management
1 parent c2c74f7 commit 2228151

File tree

264 files changed

+302
-305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

264 files changed

+302
-305
lines changed

cypress/integration/sidebar/config.spec.js

Lines changed: 2 additions & 305 deletions
Original file line numberDiff line numberDiff line change
@@ -1,308 +1,5 @@
1-
describe('Sidebar', () => {
2-
3-
4-
context('Mobile', () => {
5-
beforeEach(() => {
6-
cy.viewport('iphone-x')
7-
cy.visit('http://localhost:3000');
8-
});
9-
10-
const quickStartIds = [
11-
'initialize',
12-
'writing-content',
13-
'preview-your-site',
14-
'manual-initialization',
15-
'loading-dialog',
16-
];
17-
quickStartIds.forEach(id => {
18-
it('go to #quickstart?id=' + id, () => {
19-
cy.get('.sidebar-toggle').click();
20-
cy.get(
21-
'.sidebar-nav > :nth-child(1) > :nth-child(1) > ul > :nth-child(1) > a'
22-
).click();
23-
24-
cy.get(`#${id}`).click()
25-
cy.matchImageSnapshot();
26-
27-
});
28-
});
29-
30-
const configurationIds = [
31-
'el',
32-
'repo',
33-
'maxlevel',
34-
'loadnavbar',
35-
'loadsidebar',
36-
'hidesidebar',
37-
'submaxlevel',
38-
'auto2top',
39-
'homepage',
40-
'basepath',
41-
'relativepath',
42-
'coverpage',
43-
'logo',
44-
'name',
45-
'namelink',
46-
'markdown',
47-
'themecolor',
48-
'alias',
49-
'autoheader',
50-
'executescript',
51-
'noemoji',
52-
'mergenavbar',
53-
'formatupdated',
54-
'externallinktarget',
55-
'cornerexternallinktarget',
56-
'externallinkrel',
57-
'routermode',
58-
'nocompilelinks',
59-
'onlycover',
60-
'requestheaders',
61-
'ext',
62-
'fallbacklanguages',
63-
'notfoundpage',
64-
];
65-
configurationIds.forEach(id => {
66-
it('go to #configuration?id=' + id, () => {
67-
cy.get('.sidebar-toggle').click();
68-
cy.get('[href="#/configuration"]').click();
69-
70-
cy.get(`#${id}`).click()
71-
cy.matchImageSnapshot();
72-
});
73-
});
74-
75-
const morePagesIds = [
76-
'sidebar',
77-
'nested-sidebars',
78-
'set-page-titles-from-sidebar-selection',
79-
'table-of-contents',
80-
'ignoring-subheaders',
81-
];
82-
morePagesIds.forEach(id => {
83-
it('go to #more-pages?id=' + id, () => {
84-
cy.get('.sidebar-toggle').click();
85-
cy.get('[href="#/more-pages"]').click();
86-
87-
cy.get(`#${id}`).click()
88-
cy.matchImageSnapshot();
89-
90-
});
91-
});
92-
93-
const customNavbarIds = [
94-
'html',
95-
'markdown',
96-
'nesting',
97-
'combining-custom-navbars-with-the-emoji-plugin',
98-
];
99-
customNavbarIds.forEach(id => {
100-
it('go to #custom-navbar?id=' + id, () => {
101-
cy.get('.sidebar-toggle').click();
102-
cy.get('[href="#/custom-navbar"]').click();
103-
104-
cy.get(`#${id}`).click()
105-
cy.matchImageSnapshot();
106-
});
107-
});
108-
109-
const coverIds = [
110-
'basic-usage',
111-
'custom-background',
112-
'coverpage-as-homepage',
113-
'multiple-covers',
114-
];
115-
coverIds.forEach(id => {
116-
it('go to #cover?id=' + id, () => {
117-
cy.get('.sidebar-toggle').click();
118-
cy.get('[href="#/cover"]').click();
119-
120-
cy.get(`#${id}`).click()
121-
cy.matchImageSnapshot();
122-
});
123-
});
124-
125-
const themesIds = ['other-themes'];
126-
themesIds.forEach(id => {
127-
it('go to #themes?id=' + id, () => {
128-
cy.get('.sidebar-toggle').click();
129-
cy.get('[href="#/themes"]').click();
130-
131-
cy.get(`#${id}`).click()
132-
cy.matchImageSnapshot();
133-
});
134-
});
135-
136-
const pluginsIds = [
137-
'full-text-search',
138-
'google-analytics',
139-
'emoji',
140-
'external-script',
141-
'zoom-image',
142-
'edit-on-github',
143-
'demo-code-with-instant-preview-and-jsfiddle-integration',
144-
'copy-to-clipboard',
145-
'disqus',
146-
'gitalk',
147-
'pagination',
148-
'codefund',
149-
'tabs',
150-
'more-plugins',
151-
];
152-
pluginsIds.forEach(id => {
153-
it('go to #plugins?id=' + id, () => {
154-
cy.get('.sidebar-toggle').click();
155-
cy.get('[href="#/plugins"]').click();
156-
157-
cy.get(`#${id}`).click()
158-
cy.matchImageSnapshot();
159-
});
160-
});
161-
162-
const writeAPluginIds = ['full-configuration', 'example', 'tips'];
163-
writeAPluginIds.forEach(id => {
164-
it('go to #write-a-plugin?id=' + id, () => {
165-
cy.get('.sidebar-toggle').click();
166-
cy.get('[href="#/write-a-plugin"]').click();
167-
168-
cy.get(`#${id}`).click()
169-
cy.matchImageSnapshot();
170-
});
171-
});
172-
173-
const markdownIds = ['supports-mermaid'];
174-
markdownIds.forEach(id => {
175-
it('go to #markdown?id=' + id, () => {
176-
cy.get('.sidebar-toggle').click();
177-
cy.get('[href="#/markdown"]').click();
178-
179-
cy.get(`#${id}`).click()
180-
cy.matchImageSnapshot();
181-
});
182-
});
183-
184-
it('go to #Language-highlight', () => {
185-
cy.get('.sidebar-toggle').click();
186-
cy.get('a[href="#/language-highlight"]').click();
187-
cy.matchImageSnapshot();
188-
});
189-
190-
// const deployIds = [
191-
// 'github-pages',
192-
// 'gitlab-pages',
193-
// 'firebase-hosting',
194-
// 'vps',
195-
// 'netlify',
196-
// 'zeit-now',
197-
// 'aws-amplify'
198-
// ]
199-
// deployIds.forEach(id => {
200-
// it('go to #deploy?id=' + id, () => {
201-
// cy.get('[href="#/deploy"]').click()
202-
203-
// cy.get(`a.section-link[href='#/deploy?id=${id}']`)
204-
// .click()
205-
// .then(() => {
206-
// cy.wait(500)
207-
// cy.matchImageSnapshot()
208-
// })
209-
// })
210-
// })
211-
212-
const helpersIds = [
213-
'important-content',
214-
'general-tips',
215-
'ignore-to-compile-link',
216-
'set-target-attribute-for-link',
217-
'disable-link',
218-
'github-task-lists',
219-
'customise-id-for-headings',
220-
'markdown-in-html-tag',
221-
];
222-
helpersIds.forEach(id => {
223-
it('go to #helpers?id=' + id, () => {
224-
cy.get('.sidebar-toggle').click();
225-
cy.get('[href="#/helpers"]').click();
226-
227-
cy.get(`#${id}`).click()
228-
cy.matchImageSnapshot();
229-
});
230-
});
231-
232-
const vueIds = ['basic-usage', 'combine-vuep-to-write-playground'];
233-
vueIds.forEach(id => {
234-
it('go to #vue?id=' + id, () => {
235-
cy.get('.sidebar-toggle').click();
236-
cy.get('[href="#/vue"]').click();
237-
238-
cy.get(`#${id}`).click()
239-
cy.matchImageSnapshot();
240-
});
241-
});
242-
243-
const cdnIds = [
244-
'latest-version',
245-
'specific-version',
246-
'compressed-file',
247-
'other-cdn',
248-
];
249-
cdnIds.forEach(id => {
250-
it('go to #cdn?id=' + id, () => {
251-
cy.get('.sidebar-toggle').click();
252-
cy.get('[href="#/cdn"]').click();
253-
254-
cy.get(`#${id}`).click()
255-
cy.matchImageSnapshot();
256-
});
257-
});
258-
259-
const pwaIds = ['create-serviceworker', 'register', 'enjoy-it'];
260-
pwaIds.forEach(id => {
261-
it('go to #pwa?id=' + id, () => {
262-
cy.get('.sidebar-toggle').click();
263-
cy.get('[href="#/pwa"]').click();
264-
265-
cy.get(`#${id}`).click()
266-
cy.matchImageSnapshot();
267-
});
268-
});
269-
270-
const ssrIds = [
271-
'why-ssr',
272-
'quick-start',
273-
'custom-template',
274-
'configuration',
275-
'deploy-for-your-vps',
276-
];
277-
278-
ssrIds.forEach(id => {
279-
it('go to #ssr?id=' + id, () => {
280-
cy.get('.sidebar-toggle').click();
281-
cy.get('[href="#/ssr"]').click();
282-
283-
cy.get(`#${id}`).click()
284-
cy.matchImageSnapshot();
285-
});
286-
});
287-
288-
const embedFilesIds = [
289-
'embedded-file-type',
290-
'embedded-code-fragments',
291-
'tag-attribute',
292-
'the-code-block-highlight',
293-
];
294-
embedFilesIds.forEach(id => {
295-
it('go to #embed-files?id=' + id, () => {
296-
cy.get('.sidebar-toggle').click();
297-
cy.get('[href="#/embed-files"]').click();
298-
299-
cy.get(`#${id}`).click()
300-
cy.matchImageSnapshot();
301-
});
302-
});
303-
});
304-
305-
context('sidebar.configurations', () => {
1+
describe('Desktop view', () => {
2+
context('Sidebar links', () => {
3063
beforeEach(() => {
3074
cy.visit('http://localhost:3000');
3085
});

0 commit comments

Comments
 (0)