Skip to content

Commit

Permalink
Replace hardcoded url with a config property (#439)
Browse files Browse the repository at this point in the history
Co-authored-by: serav <[email protected]>
  • Loading branch information
vrseraphin and serav authored Mar 5, 2024
1 parent 09fe0e7 commit e812f0f
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions tests/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const config = {
baseUrl: 'http://localhost:3502/portal',
embeddedUrl: 'http://localhost:3502/embedded',
apps: {
mediaCo: {
rep: {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/Digv2/ComplexFields/CaseReference.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const config = require('../../../config');
const common = require('../../../common');

test.beforeEach(async ({ page }) => {
await page.goto('http://localhost:3502/portal');
await page.goto(config.config.baseUrl);
});

test.describe('E2E test', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/Digv2/ComplexFields/CaseView.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const detailsTabVisible = false;
const caseHistoryTabVisible = true;

test.beforeEach(async ({ page }) => {
await page.goto('http://localhost:3502/portal');
await page.goto(config.config.baseUrl);
});

test.describe('E2E test', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/Digv2/ComplexFields/DataReference.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const config = require('../../../config');
const common = require('../../../common');

test.beforeEach(async ({ page }) => {
await page.goto('http://localhost:3502/portal');
await page.goto(config.config.baseUrl);
});

test.describe('E2E test', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/Digv2/ComplexFields/EmbeddedData.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const common = require('../../../common');

test.beforeEach(async ({ page }) => {
await page.setViewportSize({ width: 1720, height: 1080 });
await page.goto('http://localhost:3502/portal');
await page.goto(config.config.baseUrl);
});

test.describe('E2E test', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/Digv2/ComplexFields/Query.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const common = require('../../../common');

test.beforeEach(async ({ page }) => {
await page.setViewportSize({ width: 1720, height: 1080 });
await page.goto('http://localhost:3502/portal', { waitUntil: 'networkidle' });
await page.goto(config.config.baseUrl, { waitUntil: 'networkidle' });
});

test.describe('E2E test', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/Digv2/ComplexFields/UserReference.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const common = require('../../../common');

test.beforeEach(async ({ page }) => {
await page.setViewportSize({ width: 1720, height: 1080 });
await page.goto('http://localhost:3502/portal');
await page.goto(config.config.baseUrl);
});

test.describe('E2E test', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/Digv2/FormFields/TextInput.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const isVisible = true;

test.beforeEach(async ({ page }) => {
await page.setViewportSize({ width: 1720, height: 1080 });
await page.goto('http://localhost:3502/portal');
await page.goto(config.config.baseUrl);
});

test.describe('E2E test', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/Digv2/ViewTemplates/Confirmation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const config = require('../../../config');
const common = require('../../../common');

test.beforeEach(async ({ page }) => {
await page.goto('http://localhost:3502/portal');
await page.goto(config.config.baseUrl);
});

test.describe('E2E test', () => {
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/MediaCo/embedded.spec.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/* eslint-disable no-undef */

const { test } = require('@playwright/test');
const config = require('../../config');
const common = require('../../common');

test.beforeEach(async ({ page }) => {
await page.goto('http://localhost:3502/embedded');
await page.goto(config.config.embeddedUrl);
});

test.describe('E2E test', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/MediaCo/portal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let caseID;

test.beforeEach(async ({ page }) => {
await page.setViewportSize({ width: 1720, height: 1080 });
await page.goto('http://localhost:3502/portal', { waitUntil: 'networkidle' });
await page.goto(config.config.baseUrl, { waitUntil: 'networkidle' });
});

test.describe('E2E test', () => {
Expand Down

0 comments on commit e812f0f

Please sign in to comment.