Skip to content

Commit a66964f

Browse files
committed
Add more pages to be tested,
1 parent 5af5358 commit a66964f

1 file changed

Lines changed: 116 additions & 52 deletions

File tree

‎tests/e2e/utils/accessibility-pages.js‎

Lines changed: 116 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -56,34 +56,14 @@
5656
const { filterByStatus } = require( './admin-interactions' );
5757

5858
const pages = [
59-
// Media.
59+
// Dashboard.
6060
{
61-
id: 'media-library-grid',
62-
path: '/upload.php?mode=grid',
63-
name: 'Media Library (Grid View)',
64-
stateVariants: [
65-
{
66-
name: 'default',
67-
},
68-
{
69-
name: 'image-modal-open',
70-
setup: async ( page ) => {
71-
// Click the image to open the attachment modal.
72-
const imageLink = page.locator( '.attachment' ).first();
73-
await imageLink.click();
74-
// Wait for modal to appear.
75-
await page.waitForSelector( '.media-modal' );
76-
},
77-
},
78-
],
79-
},
80-
{
81-
id: 'media-library-list',
82-
path: '/upload.php?mode=list',
83-
name: 'Media Library (List View)',
61+
id: 'dashboard',
62+
path: '/',
63+
name: 'Dashboard',
8464
},
8565

86-
// Posts & pages.
66+
// Posts & Pages.
8767
{
8868
id: 'posts-list',
8969
path: '/edit.php?post_type=post',
@@ -116,14 +96,124 @@ const pages = [
11696
path: '/edit.php?post_type=page',
11797
name: 'Pages',
11898
},
99+
{
100+
id: 'post-categories-list',
101+
path: '/edit-tags.php?taxonomy=category',
102+
name: 'Categories',
103+
},
104+
{
105+
id: 'post-tags-list',
106+
path: '/edit-tags.php?taxonomy=post_tag',
107+
name: 'Tags',
108+
},
109+
110+
// Media.
111+
{
112+
id: 'media-library-grid',
113+
path: '/upload.php?mode=grid',
114+
name: 'Media Library (Grid View)',
115+
stateVariants: [
116+
{
117+
name: 'default',
118+
},
119+
{
120+
name: 'image-modal-open',
121+
setup: async ( page ) => {
122+
// Click the image to open the attachment modal.
123+
const imageLink = page.locator( '.attachment' ).first();
124+
await imageLink.click();
125+
// Wait for modal to appear.
126+
await page.waitForSelector( '.media-modal' );
127+
},
128+
},
129+
],
130+
},
131+
{
132+
id: 'media-library-list',
133+
path: '/upload.php?mode=list',
134+
name: 'Media Library (List View)',
135+
},
119136

120137
// Comments.
121138
{
122-
id: 'comments-all',
139+
id: 'comments',
123140
path: '/edit-comments.php',
124141
name: 'Comments',
125142
},
126143

144+
// Appearance.
145+
{
146+
id: 'themes',
147+
path: '/themes.php',
148+
name: 'Themes',
149+
},
150+
{
151+
id: 'add-themes',
152+
path: '/theme-install.php?browse=popular',
153+
name: 'Add Themes',
154+
},
155+
{
156+
id: 'fonts-list',
157+
path: '/font-library.php?p=%2Ffont-list',
158+
name: 'Fonts',
159+
},
160+
161+
// Plugins.
162+
{
163+
id: 'installed-plugins',
164+
path: '/plugins.php',
165+
name: 'Plugins',
166+
},
167+
{
168+
id: 'add-plugins',
169+
path: '/plugin-install.php',
170+
name: 'Add Plugins',
171+
},
172+
173+
// Users.
174+
{
175+
id: 'users-list',
176+
path: '/users.php',
177+
name: 'Users',
178+
},
179+
{
180+
id: 'add-user',
181+
path: '/user-new.php',
182+
name: 'Add User',
183+
},
184+
185+
// Tools.
186+
{
187+
id: 'tools',
188+
path: '/tools.php',
189+
name: 'Tools',
190+
},
191+
{
192+
id: 'tools-import',
193+
path: '/import.php',
194+
name: 'Tools - Import',
195+
},
196+
{
197+
id: 'tools-export',
198+
path: '/export.php',
199+
name: 'Tools - Export',
200+
},
201+
{
202+
id: 'site-health',
203+
path: '/site-health.php',
204+
name: 'Tools - Site Health',
205+
},
206+
{
207+
id: 'export-personal-data',
208+
path: '/export-personal-data.php',
209+
name: 'Tools - Export Personal Data',
210+
},
211+
{
212+
id: 'erase-personal-data',
213+
path: '/erase-personal-data.php',
214+
name: 'Tools - Erase Personal Data',
215+
},
216+
127217
// Settings.
128218
{
129219
id: 'settings-general',
@@ -173,32 +263,6 @@ const pages = [
173263
name: 'Settings - Privacy',
174264
},
175265

176-
// Users.
177-
{
178-
id: 'users-list',
179-
path: '/users.php',
180-
name: 'Users',
181-
},
182-
183-
// Dashboard & tools.
184-
{
185-
id: 'dashboard',
186-
path: '/',
187-
name: 'Dashboard',
188-
},
189-
190-
{
191-
id: 'tools-import',
192-
path: '/import.php',
193-
name: 'Tools - Import',
194-
},
195-
196-
{
197-
id: 'tools-export',
198-
path: '/export.php',
199-
name: 'Tools - Export',
200-
},
201-
202266
// Admin profile.
203267
{
204268
id: 'profile',

0 commit comments

Comments
 (0)