Skip to content

Commit

Permalink
fix(project): e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
olga-jwp committed Jul 25, 2023
1 parent fe7cad4 commit 2b18938
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test-e2e/tests/playlist_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Scenario('I can filter and click on a card and navigate to the video screen', as
});

function canNavigateToBigBuckBunny(I: CodeceptJS.I) {
I.click({ css: 'div[aria-label="Play Big Buck Bunny"]' });
I.click({ css: 'a[aria-label="Big Buck Bunny"]' });

I.see(constants.bigBuckBunnyDescription);
I.see(constants.startWatchingButton);
Expand Down
2 changes: 1 addition & 1 deletion test-e2e/tests/watch_history/local_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Scenario('I can see my watch history on the Home screen', async ({ I }) => {
I.see('10 min');
});

const selector = `${makeShelfXpath(ShelfId.continueWatching)}//div[@aria-label="Play ${videoTitle}"]`;
const selector = `${makeShelfXpath(ShelfId.continueWatching)}//a[@aria-label="${videoTitle}"]`;
await checkProgress(I, selector, (200 / videoLength) * 100);

I.click(selector);
Expand Down
2 changes: 1 addition & 1 deletion test-e2e/tests/watch_history/logged_in_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function runTestSuite(config: typeof testConfigs.svod, configNoWatchlist: typeof
I.see('10 min');
});

const selector = `${makeShelfXpath(ShelfId.continueWatching)}//div[@aria-label="Play ${videoTitle}"]`;
const selector = `${makeShelfXpath(ShelfId.continueWatching)}//a[@aria-label="${videoTitle}"]`;
await checkProgress(I, selector, (80 / videoLength) * 100);

I.click(selector);
Expand Down
2 changes: 1 addition & 1 deletion test-e2e/utils/steps_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ const stepsObj = {
scrollToTheRight: boolean = true,
preOpenCallback?: (locator: string) => void,
) {
const locator = `//div[@aria-label="Play ${name}"]`;
const locator = `//a[@aria-label="${name}"]`;
const shelfXpath = shelf ? makeShelfXpath(shelf) : undefined;

if (shelfXpath) {
Expand Down

0 comments on commit 2b18938

Please sign in to comment.