Skip to content

Commit bc08526

Browse files
authored
vp test: remove toPass wrap from existing specs (#783)
1 parent 60c543c commit bc08526

File tree

6 files changed

+13
-27
lines changed

6 files changed

+13
-27
lines changed

test/e2e/specs/autoplayOnScrollPage.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { vpTest } from '../fixtures/vpTest';
2-
import { expect, test } from '@playwright/test';
2+
import { test } from '@playwright/test';
33
import { waitForPageToLoadWithTimeout } from '../src/helpers/waitForPageToLoadWithTimeout';
44
import { getLinkByName } from '../testData/pageLinksData';
55
import { ExampleLinkName } from '../testData/ExampleLinkNames';
@@ -23,8 +23,6 @@ vpTest(`Test if video on autoplay on scroll page is playing as expected`, async
2323
await pomPages.autoplayOnScrollPage.autoplayOnScrollVideoComponent.locator.scrollIntoViewIfNeeded();
2424
});
2525
await test.step('Validating that the video is auto playing after scrolling', async () => {
26-
await expect(async () => {
27-
await pomPages.autoplayOnScrollPage.autoplayOnScrollVideoComponent.validateVideoIsPlaying(true);
28-
}).toPass({ intervals: [500], timeout: 3000 });
26+
await pomPages.autoplayOnScrollPage.autoplayOnScrollVideoComponent.validateVideoIsPlaying(true);
2927
});
3028
});

test/e2e/specs/chaptersPage.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { vpTest } from '../fixtures/vpTest';
2-
import { expect, test } from '@playwright/test';
2+
import { test } from '@playwright/test';
33
import { waitForPageToLoadWithTimeout } from '../src/helpers/waitForPageToLoadWithTimeout';
44
import { getLinkByName } from '../testData/pageLinksData';
55
import { ExampleLinkName } from '../testData/ExampleLinkNames';
@@ -21,8 +21,6 @@ vpTest(`Test if 3 videos on chapters page are playing as expected`, async ({ pag
2121
await pomPages.chaptersPage.chapterAutoVttFileVideoComponent.locator.scrollIntoViewIfNeeded();
2222
});
2323
await test.step('Validating that chapters auto vtt file video is playing', async () => {
24-
await expect(async () => {
25-
await pomPages.chaptersPage.chapterAutoVttFileVideoComponent.validateVideoIsPlaying(true);
26-
}).toPass({ intervals: [500], timeout: 3000 });
24+
await pomPages.chaptersPage.chapterAutoVttFileVideoComponent.validateVideoIsPlaying(true);
2725
});
2826
});

test/e2e/specs/cldAnalyticsPage.spec.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { vpTest } from '../fixtures/vpTest';
2-
import { expect, test } from '@playwright/test';
2+
import { test } from '@playwright/test';
33
import { waitForPageToLoadWithTimeout } from '../src/helpers/waitForPageToLoadWithTimeout';
44
import { getLinkByName } from '../testData/pageLinksData';
55
import { ExampleLinkName } from '../testData/ExampleLinkNames';
@@ -21,16 +21,12 @@ vpTest(`Test if 4 videos on Cloudinary analytics page are playing as expected`,
2121
await pomPages.cldAnalyticsPage.cldAnalyticsCustomDataObjectVideoComponent.locator.scrollIntoViewIfNeeded();
2222
});
2323
await test.step('Validating that Cloudinary analytics custom data object video is playing', async () => {
24-
await expect(async () => {
25-
await pomPages.cldAnalyticsPage.cldAnalyticsCustomDataObjectVideoComponent.validateVideoIsPlaying(true);
26-
}).toPass({ intervals: [500], timeout: 3000 });
24+
await pomPages.cldAnalyticsPage.cldAnalyticsCustomDataObjectVideoComponent.validateVideoIsPlaying(true);
2725
});
2826
await test.step('Scroll until Cloudinary analytics custom data function video element is visible', async () => {
2927
await pomPages.cldAnalyticsPage.cldAnalyticsCustomDataFunctionVideoComponent.locator.scrollIntoViewIfNeeded();
3028
});
3129
await test.step('Validating that Cloudinary analytics custom data function video is playing', async () => {
32-
await expect(async () => {
33-
await pomPages.cldAnalyticsPage.cldAnalyticsCustomDataFunctionVideoComponent.validateVideoIsPlaying(true);
34-
}).toPass({ intervals: [500], timeout: 3000 });
30+
await pomPages.cldAnalyticsPage.cldAnalyticsCustomDataFunctionVideoComponent.validateVideoIsPlaying(true);
3531
});
3632
});

test/e2e/specs/codecsAndFormats.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { vpTest } from '../fixtures/vpTest';
2-
import { expect, test } from '@playwright/test';
2+
import { test } from '@playwright/test';
33
import { waitForPageToLoadWithTimeout } from '../src/helpers/waitForPageToLoadWithTimeout';
44
import { getLinkByName } from '../testData/pageLinksData';
55
import { ExampleLinkName } from '../testData/ExampleLinkNames';
@@ -21,8 +21,6 @@ vpTest(`Test if 3 videos on codecs and formats page are playing as expected`, as
2121
await pomPages.codecsAndFormatsPage.codecsAndFormatsVp9VideoComponent.locator.scrollIntoViewIfNeeded();
2222
});
2323
await test.step('Validating that VP9 video is playing', async () => {
24-
await expect(async () => {
25-
await pomPages.codecsAndFormatsPage.codecsAndFormatsVp9VideoComponent.validateVideoIsPlaying(true);
26-
}).toPass({ intervals: [500], timeout: 3000 });
24+
await pomPages.codecsAndFormatsPage.codecsAndFormatsVp9VideoComponent.validateVideoIsPlaying(true);
2725
});
2826
});

test/e2e/specs/colorsApiPage.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { vpTest } from '../fixtures/vpTest';
2-
import { expect, test } from '@playwright/test';
2+
import { test } from '@playwright/test';
33
import { waitForPageToLoadWithTimeout } from '../src/helpers/waitForPageToLoadWithTimeout';
44
import { getLinkByName } from '../testData/pageLinksData';
55
import { ExampleLinkName } from '../testData/ExampleLinkNames';
@@ -21,8 +21,6 @@ vpTest(`Test if 3 videos on colors API page are playing as expected`, async ({ p
2121
await pomPages.colorsApiPage.colorsApiLightSkinVideoComponent.locator.scrollIntoViewIfNeeded();
2222
});
2323
await test.step('Validating that light skin video is playing', async () => {
24-
await expect(async () => {
25-
await pomPages.colorsApiPage.colorsApiLightSkinVideoComponent.validateVideoIsPlaying(true);
26-
}).toPass({ intervals: [500], timeout: 3000 });
24+
await pomPages.colorsApiPage.colorsApiLightSkinVideoComponent.validateVideoIsPlaying(true);
2725
});
2826
});

test/e2e/specs/multiplePlayersPage.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { vpTest } from '../fixtures/vpTest';
2-
import { expect, test } from '@playwright/test';
2+
import { test } from '@playwright/test';
33
import { waitForPageToLoadWithTimeout } from '../src/helpers/waitForPageToLoadWithTimeout';
44
import { getLinkByName } from '../testData/pageLinksData';
55
import { ExampleLinkName } from '../testData/ExampleLinkNames';
@@ -21,8 +21,6 @@ vpTest(`Test if 3 videos on multiple players page are playing as expected`, asyn
2121
await pomPages.colorsApiPage.colorsApiLightSkinVideoComponent.locator.scrollIntoViewIfNeeded();
2222
});
2323
await test.step('Validating that player 3 video is playing', async () => {
24-
await expect(async () => {
25-
await pomPages.multiplePlayersPage.multiplePlayersPlayer3VideoComponent.validateVideoIsPlaying(true);
26-
}).toPass({ intervals: [500], timeout: 3000 });
24+
await pomPages.multiplePlayersPage.multiplePlayersPlayer3VideoComponent.validateVideoIsPlaying(true);
2725
});
2826
});

0 commit comments

Comments
 (0)