Skip to content

Commit

Permalink
Set up permalinks
Browse files Browse the repository at this point in the history
  • Loading branch information
irshadahmad21 committed Oct 11, 2024
1 parent 0a3dc51 commit 873d04e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ const config = defineConfig({
new URL('./config/global-setup.ts', import.meta.url).href,
),
projects: [
{
name: 'site-setup',
testMatch: /site-setup\.ts/,
},
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
grepInvert: /-chromium/,
dependencies: ['site-setup'],
},
{
name: 'webkit',
Expand All @@ -24,12 +29,14 @@ const config = defineConfig({
},
grep: /@webkit/,
grepInvert: /-webkit/,
dependencies: ['site-setup'],
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
grep: /@firefox/,
grepInvert: /-firefox/,
dependencies: ['site-setup'],
},
],
});
Expand Down
14 changes: 14 additions & 0 deletions test/e2e/specs/site-setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { test as setup } from '@wordpress/e2e-test-utils-playwright';

setup('Use pretty permalinks', async ({ page, admin }) => {
await admin.visitAdminPage('options-permalink.php');

await page.getByRole('radio', { name: 'Post name' }).check();

await page.getByRole('button', { name: 'Save Changes' }).click();

await page
.getByRole('paragraph')
.filter({ hasText: 'Permalink structure updated.' })
.waitFor();
});

0 comments on commit 873d04e

Please sign in to comment.