Skip to content

Commit 14a6bc0

Browse files
committed
fix(#1349727): E2E - tweak CI timeout and ensure dynamic values for config test
1 parent 57677bc commit 14a6bc0

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

front/e2e/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default defineConfig({
1616
permissions: ['clipboard-read', 'clipboard-write'],
1717
},
1818
expect: {
19-
timeout: process.env.CI ? 60000 : 20000, // 20s per expect in local, 60 in CI
19+
timeout: process.env.CI ? 30000 : 20000, // 20s per expect in local, 60 in CI
2020
},
2121
projects: [
2222
{

front/e2e/src/tests/pages/admin/settings/configurations.spec.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,23 @@ const texts = {
5454
}
5555

5656
// Test configuration values for different scopes
57-
const testValues = {
58-
general: {
59-
baseUrl: `https://example.com/media/catalog/product${Math.random()}`,
60-
defaultSender: `contactgeneral${Math.random()}@example.com`,
61-
},
62-
catalog: {
63-
baseUrl: `https://example.com/media/catalog/productcatalog${Math.random()}`,
64-
defaultSender: `contactcatalog${Math.random()}@example.com`,
65-
},
57+
// Must be a function so when running premium and standard tests
58+
// back to back, the values change between each test
59+
function getTestValues(): Record<string, Record<string, string>> {
60+
return {
61+
general: {
62+
baseUrl: `https://example.com/media/catalog/product${Math.random()}`,
63+
defaultSender: `contactgeneral${Math.random()}@example.com`,
64+
},
65+
catalog: {
66+
baseUrl: `https://example.com/media/catalog/productcatalog${Math.random()}`,
67+
defaultSender: `contactcatalog${Math.random()}@example.com`,
68+
},
69+
}
6670
}
6771

6872
async function testConfigurationsPage(page: Page, gallyPackage: GallyPackage): Promise<void> {
69-
73+
const testValues = getTestValues()
7074
await test.step('Login and navigate to the configuration form page', async () => {
7175
await login(page)
7276
await navigateTo(

0 commit comments

Comments
 (0)