Skip to content

Commit

Permalink
Merge pull request #29 from dayschedule/development
Browse files Browse the repository at this point in the history
Fixed playwright test
  • Loading branch information
vickyRathee authored Apr 3, 2024
2 parents 5c28655 + 6549f39 commit 93b10f5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 'latest'
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
Expand Down
1 change: 1 addition & 0 deletions examples/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ <h2 class="display-5">Hide header</h2>
/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.0/highlight.min.js"></script>
<script>

hljs.highlightAll();
</script>

Expand Down
7 changes: 7 additions & 0 deletions tests/popup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ import * as path from "path";

const uri = `file:${path.join(__dirname, "../examples/popup.html")}`;

test.beforeEach(async ({ page }) => {
await page.route("**/highlight.min.js", (route) => {
route.abort();
});
});

test("has title", async ({ page }) => {
await page.goto(uri);
await page.setViewportSize({ width: 1960, height: 1080 });
await expect(page).toHaveTitle(/popup/);
});

Expand Down

0 comments on commit 93b10f5

Please # to comment.