Skip to content

Commit

Permalink
Added prevent of navigation to sample page if we are already there
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandercerutti committed Feb 15, 2024
1 parent 8190924 commit 9944ce7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/captions-renderer/specs/RendererFixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ interface RendererFixture {
const SUB37_SAMPLE_PAGE_PATH = "./pages/sub37-example/index.html";

export const RendererFixture = base.extend<RendererFixture>({
page({ page }, use) {
page.goto(SUB37_SAMPLE_PAGE_PATH);
async page({ page }, use) {
if (!page.url().includes(SUB37_SAMPLE_PAGE_PATH)) {
await page.goto(SUB37_SAMPLE_PAGE_PATH);
}

return use(page);
},
getFakeVideo({ page }, use) {
Expand Down

0 comments on commit 9944ce7

Please sign in to comment.