diff --git a/configs/dx.config.js b/configs/dx.config.js index f17fec5d..70325443 100644 --- a/configs/dx.config.js +++ b/configs/dx.config.js @@ -37,33 +37,24 @@ const config = { actionTimeout: 60000, trace: 'on-first-retry', - baseURL: process.env.BASE_URL || envs['@dx_stage'] || 'https://stage--dx-partners--adobecom.hlx.live', + baseURL: process.env.PR_BRANCH_LIVE_URL || envs['@dx_stage'] || 'https://stage--dx-partners--adobecom.hlx.live', }, /* Configure projects for major browsers */ projects: [ { name: 'dx-live-chromium', - use: { - ...devices['Desktop Chrome'], - baseURL: envs['@dx_stage'], - }, + use: { ...devices['Desktop Chrome'] }, }, { name: 'dx-live-firefox', - use: { - ...devices['Desktop Firefox'], - baseURL: envs['@dx_stage'], - }, + use: { ...devices['Desktop Firefox'] }, }, { name: 'dx-live-webkit', - use: { - ...devices['Desktop Safari'], - baseURL: envs['@dx_stage'], - }, + use: { ...devices['Desktop Safari'] }, }, ], }; diff --git a/tests/dx/news.test.js b/tests/dx/news.test.js index 2f0a65b9..b7cf7aac 100644 --- a/tests/dx/news.test.js +++ b/tests/dx/news.test.js @@ -13,7 +13,7 @@ test.describe('Validate news block', () => { test(`${features[0].name},${features[0].tags}`, async ({ page, baseURL }) => { await test.step('Go to News page', async () => { await page.goto(`${baseURL}${features[0].path}`); - await newsPage.firstCardTitle.waitFor({ state: 'visible', timeout: 30000 }); + await newsPage.firstCardTitle.waitFor({ state: 'visible', timeout: 3000 }); const result = await newsPage.resultNumber.textContent(); await expect(parseInt(result.split(' ')[0], 10)).toBeGreaterThan(6); }); @@ -39,7 +39,7 @@ test.describe('Validate news block', () => { await test.step('Clear all', async () => { await newsPage.clearAllSelector.click(); const result = await newsPage.resultNumber.textContent(); - await expect(parseInt(result.split(' ')[0], 10)).toBeGreaterThan(7); + await expect(parseInt(result.split(' ')[0], 10)).toBeGreaterThan(6); }); await test.step('Enter This is automation in search field', async () => { @@ -52,7 +52,7 @@ test.describe('Validate news block', () => { test(`${features[1].name},${features[1].tags}`, async ({ page, baseURL }) => { await test.step('Go to News page', async () => { await page.goto(`${baseURL}${features[0].path}`); - await newsPage.firstCardTitle.waitFor({ state: 'visible', timeout: 30000 }); + await newsPage.firstCardTitle.waitFor({ state: 'visible', timeout: 3000 }); const result = await newsPage.resultNumber.textContent(); await expect(parseInt(result.split(' ')[0], 10)).toBeGreaterThan(6); }); @@ -81,7 +81,7 @@ test.describe('Validate news block', () => { test(`${features[2].name},${features[2].tags}`, async ({ page, baseURL }) => { await test.step('Go to News page', async () => { await page.goto(`${baseURL}${features[0].path}`); - await newsPage.firstCardTitle.waitFor({ state: 'visible', timeout: 30000 }); + await newsPage.firstCardTitle.waitFor({ state: 'visible', timeout: 3000 }); const result = await newsPage.resultNumber.textContent(); await expect(parseInt(result.split(' ')[0], 10)).toBeGreaterThan(6); });