Skip to content

Commit 2162b7c

Browse files
fix e2e
1 parent 90b8ad7 commit 2162b7c

8 files changed

Lines changed: 10 additions & 78 deletions

File tree

workspaces/scorecard/e2e-tests/test_yamls/app-config-e2e-de.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

workspaces/scorecard/e2e-tests/test_yamls/app-config-e2e-en.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

workspaces/scorecard/e2e-tests/test_yamls/app-config-e2e-es.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

workspaces/scorecard/e2e-tests/test_yamls/app-config-e2e-fr.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

workspaces/scorecard/e2e-tests/test_yamls/app-config-e2e-it.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

workspaces/scorecard/e2e-tests/test_yamls/app-config-e2e-ja.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

workspaces/scorecard/packages/app-legacy/e2e-tests/pages/CatalogPage.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ export class CatalogPage {
5252
}
5353

5454
async openCatalog() {
55-
await this.page.goto('/catalog'); // Resolves the issue when "My Groups" sidebar covers the catalog toolbar
56-
await this.page.getByTestId('user-picker-all').getByText('All').click();
55+
await this.page.goto('/catalog');
56+
const allFilter = this.page.getByTestId('user-picker-all').getByText('All');
57+
await allFilter.waitFor({ state: 'visible', timeout: 10000 });
58+
await allFilter.click({ force: true });
5759
}
5860

5961
async openComponent(componentName: string) {
@@ -78,6 +80,5 @@ export class CatalogPage {
7880
).toBeVisible({ timeout: 10000 });
7981
await this.page.getByRole('button', { name: 'English' }).click();
8082
await this.page.getByRole('option', { name: displayName }).click();
81-
await this.page.locator('a').filter({ hasText: 'Home' }).click();
8283
}
8384
}

workspaces/scorecard/playwright.config.ts

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,7 @@ import { defineConfig } from '@playwright/test';
2020
const appMode = process.env.APP_MODE || 'legacy';
2121
const startCommand = appMode === 'legacy' ? 'yarn start:legacy' : 'yarn start';
2222

23-
// Config paths (absolute to work from any cwd)
24-
const baseConfig = `${__dirname}/app-config.yaml`;
25-
const testConfigDir = `${__dirname}/e2e-tests/test_yamls`;
26-
2723
const LOCALES = ['en', 'fr', 'it', 'ja', 'de', 'es'] as const;
28-
const FRONTEND_PORT_BASE = 3000;
29-
const BACKEND_PORT_BASE = 7007;
3024

3125
export default defineConfig({
3226
timeout: 2 * 60 * 1000,
@@ -37,19 +31,17 @@ export default defineConfig({
3731

3832
webServer: process.env.PLAYWRIGHT_URL
3933
? []
40-
: LOCALES.map((locale, i) => ({
41-
command: `${startCommand} --config ${baseConfig} --config ${testConfigDir}/app-config-e2e-${locale}.yaml`,
42-
url: `http://localhost:${
43-
BACKEND_PORT_BASE + i
44-
}/.backstage/health/v1/readiness`,
34+
: {
35+
command: startCommand,
36+
url: 'http://localhost:7007/.backstage/health/v1/readiness',
4537
timeout: 120000,
46-
reuseExistingServer: false,
38+
reuseExistingServer: !process.env.CI,
4739
cwd: __dirname,
4840
env: {
4941
JIRA_URL: 'https://issues.redhat.com',
5042
JIRA_TOKEN: 'my-jira-token',
5143
},
52-
})),
44+
},
5345

5446
retries: process.env.CI ? 2 : 0,
5547

@@ -67,13 +59,12 @@ export default defineConfig({
6759

6860
outputDir: `node_modules/.cache/e2e-test-results-${appMode}`,
6961

70-
projects: LOCALES.map((locale, i) => ({
62+
projects: LOCALES.map(locale => ({
7163
name: locale,
7264
testDir: 'packages/app-legacy/e2e-tests',
7365
use: {
7466
channel: 'chrome' as const,
7567
locale,
76-
baseURL: `http://localhost:${FRONTEND_PORT_BASE + i}`,
7768
},
7869
})),
7970
});

0 commit comments

Comments
 (0)