Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions tests/e2e/specs/yoast-integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ test.describe( 'Yoast Focus Element', () => {
'/wp-admin/admin.php?page=wpseo_page_settings#/crawl-optimization'
);

// Skip if Yoast settings page doesn't load (not installed or wrong version)
// Skip if Yoast settings page doesn't load (not installed or wrong version).
// WP 7.2+ shows a 404 "page does not exist" for unregistered admin pages.
if (
await page.locator( 'text=Sorry, you are not allowed' ).isVisible()
await page
.locator(
'text=/Sorry, you are not allowed|The requested page does not exist/'
)
.isVisible()
) {
test.skip();
return;
Expand Down Expand Up @@ -73,7 +78,11 @@ test.describe( 'Yoast Focus Element', () => {

// Skip if Yoast settings page doesn't load
if (
await page.locator( 'text=Sorry, you are not allowed' ).isVisible()
await page
.locator(
'text=/Sorry, you are not allowed|The requested page does not exist/'
)
.isVisible()
) {
test.skip();
return;
Expand Down
Loading