Skip to content

Commit 8f94da4

Browse files
test(e2e): federated-css-react-ssr build+serve startup for exposes and shells with wait-on
1 parent 99c93ba commit 8f94da4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

federated-css-react-ssr/playwright.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,17 @@ export default defineConfig({
3131
],
3232
webServer: [
3333
{
34-
command: 'pnpm --filter "federated-css-react-ssr_expose-*" --parallel start',
34+
command:
35+
"bash -lc 'pnpm --filter "federated-css-react-ssr_expose-*" -r run build && pnpm --filter "federated-css-react-ssr_expose-*" -r run serve'",
3536
cwd: __dirname,
3637
port: 3001,
3738
reuseExistingServer: reuseExisting,
3839
timeout: 300_000,
3940
},
4041
{
4142
// Start all shells and wait until all ports 4000-4005 respond
42-
command: `bash -lc 'pnpm --filter "federated-css-react-ssr_shell*" -r run start:prod & pnpm exec wait-on -t 300000 http://localhost:4000 http://localhost:4001 http://localhost:4002 http://localhost:4003 http://localhost:4004 http://localhost:4005'`,
43+
command:
44+
"bash -lc 'pnpm --filter "federated-css-react-ssr_shell*" -r run build && pnpm --filter "federated-css-react-ssr_shell*" -r run serve & pnpm exec wait-on -t 300000 http://localhost:4000 http://localhost:4001 http://localhost:4002 http://localhost:4003 http://localhost:4004 http://localhost:4005'",
4345
cwd: __dirname,
4446
port: 4005,
4547
reuseExistingServer: reuseExisting,

vue3-demo/e2e/tests/layoutChecks.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ test.describe('Vue 3 Demo', () => {
1010
test.beforeEach(async ({ page }) => {
1111
basePage = new BaseMethods(page);
1212
await basePage.openLocalhost({ number: 3001 });
13+
// Wait for layout to mount and remote component to render
14+
await basePage.checkElementVisibility({ selector: selectors.vue3DemoApp.components.layout });
15+
await basePage.checkElementVisibility({
16+
parentSelector: selectors.vue3DemoApp.components.layout,
17+
selector: selectors.vue3DemoApp.components.remote,
18+
});
1319
});
1420

1521
test('Checks page header with text visibility', async () => {

0 commit comments

Comments
 (0)