Skip to content

Commit 7e6429d

Browse files
committed
Tests: Refactor util and constant into folders
1 parent 4e544c4 commit 7e6429d

File tree

10 files changed

+9
-7
lines changed

10 files changed

+9
-7
lines changed

tests/src/cards.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect, test } from '@playwright/test';
2-
import { handleConsentPopup, waitFor } from './util';
2+
import { handleConsentPopup, waitFor } from './utils';
33

44
test.describe('Testing for cards shortcode', () => {
55
test.beforeEach(async ({ page }) => {
File renamed without changes.

tests/src/constants/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './constants';

tests/src/footer.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect, test } from '@playwright/test';
2-
import { handleConsentPopup, waitFor } from './util';
2+
import { handleConsentPopup, waitFor } from './utils';
33

44
test.describe('Smoke test for footer', () => {
55
test.beforeEach(async ({ page }) => {

tests/src/header.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect, test } from '@playwright/test';
2-
import { handleConsentPopup, waitFor } from './util';
2+
import { handleConsentPopup, waitFor } from './utils';
33

44
test.describe('Smoke test for header', () => {
55
test.beforeEach(async ({ page }) => {

tests/src/product-landing.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { test } from '@playwright/test';
2-
import { runSmokeTestOnPage } from './util';
2+
import { runSmokeTestOnPage } from './utils';
33

44
test.describe('Smoke test for landing page', () => {
55
test('product landing page renders', async ({ page }) => {

tests/src/sidebar.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect, test } from '@playwright/test';
2-
import { handleConsentPopup, runSmokeTestOnPage, waitFor } from './util';
2+
import { handleConsentPopup, runSmokeTestOnPage, waitFor } from './utils';
33

44
async function openPage(page, sidebarPage) {
55
// Find all toggles

tests/src/tabs.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect, test } from '@playwright/test';
2-
import { handleConsentPopup, waitFor } from './util';
2+
import { handleConsentPopup, waitFor } from './utils';
33

44
test.describe('Testing for tabs shortcode', () => {
55
test.beforeEach(async ({ page }) => {

tests/src/utils/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './utils';

tests/src/util.js renamed to tests/src/utils/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from '@playwright/test';
2-
import { TIMEOUT } from './constants.js';
2+
import { TIMEOUT } from '../constants';
33

44
export async function runSmokeTestOnPage(page) {
55
/* Ensure each page follows the following dom structure */

0 commit comments

Comments
 (0)