Skip to content

Commit 5654edc

Browse files
committed
See if shorthand param without blueprint avoids trying to use PHP 8.3 which is missing from zipped old site build
1 parent d8ac5ca commit 5654edc

File tree

1 file changed

+12
-28
lines changed

1 file changed

+12
-28
lines changed

packages/playground/website/playwright/e2e/deployment.spec.ts

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,16 @@ import { test, expect } from '../playground-fixtures.ts';
44
import { startVersionSwitchingServer as startServer } from '../version-switching-server.ts';
55

66
const port = 7999;
7-
const blueprint = {
8-
preferredVersions: {
9-
php: '8.0',
10-
wp: 'latest',
11-
},
12-
// Explicitly disable login because we have had trouble with
13-
// our older WP reference build refusing to login because the
14-
// admin email verification had expired.
15-
login: false,
16-
steps: [
17-
{
18-
step: 'setSiteOptions',
19-
options: {
20-
// Set the admin email lifespan to the maximum value to prevent
21-
// the admin email from expiring and causing the login step to fail.
22-
// https://github.com/WordPress/wordpress-develop/blob/f008049c49195dbfa954631fecc7fbfff0cc8ca2/src/wp-login.php#L1379-L1388
23-
admin_email_lifespan: '2147483647',
24-
},
25-
},
26-
],
27-
};
287
const url = new URL(`http://localhost:${port}`);
29-
// TODO: Say why
30-
url.searchParams.set(
31-
'blueprint-url',
32-
`data:application/json;base64,${btoa(JSON.stringify(blueprint))}`
33-
);
8+
// Disable login because an old WP build used in this test
9+
// blocks auto-login. This is because it has an admin user
10+
// with an expired email verification window. If we do not
11+
// disable auto-login, the old Playground build encounters
12+
// a build error.
13+
url.searchParams.set('login', 'no');
14+
// Specify the theme so we can assert against expected default content.
15+
// This theme is also what the reference screenshots are based on.
16+
url.searchParams.set('theme', 'twentytwentyfour');
3417

3518
const maxDiffPixels = 4000;
3619

@@ -81,7 +64,6 @@ for (const cachingEnabled of [true, false]) {
8164
await expect(page).toHaveScreenshot('website-old.png', {
8265
maxDiffPixels,
8366
});
84-
return;
8567

8668
server!.switchToNewVersion();
8769
// Reload the page instead of navigating to the URL again
@@ -92,7 +74,9 @@ for (const cachingEnabled of [true, false]) {
9274
await expect(
9375
website.page.getByLabel('Open Site Manager')
9476
).toBeVisible();
95-
await expect(wordpress.locator('body')).toContainText('Edit site');
77+
await expect(wordpress.locator('body')).toContainText(
78+
'My WordPress Website'
79+
);
9680
});
9781
}
9882

0 commit comments

Comments
 (0)