Skip to content

Commit

Permalink
Updated browser initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
NikkelM committed Jul 3, 2024
1 parent 376503a commit 1e7612c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compatibilityTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

# TODO: Find way to run headful tests in GitHub Actions
- name: Run compatibility tests
uses: nikkelm/puppeteer-headful@v1.0.0
uses: nikkelm/puppeteer-headful@master
env:
CI: "true"
with:
Expand Down
12 changes: 10 additions & 2 deletions test/compatibility.headless.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ describe("compatibility", function () {
let browser, page;

beforeEach(async () => {
browser = await puppeteer.launch({ headless: true });
browser = await puppeteer.launch({
headless: true, // Extensions only work in head-full mode
args: ['--no-sandbox'],
executablePath: process.env.PUPPETEER_EXEC_PATH, // set by docker container
});
page = await browser.newPage();

// Set the SOCS cookie for YouTube (cookie banner)
Expand Down Expand Up @@ -148,7 +152,11 @@ describe("compatibility", function () {
let browser, page;

beforeEach(async () => {
browser = await puppeteer.launch({ headless: true });
browser = await puppeteer.launch({
headless: true, // Extensions only work in head-full mode
args: ['--no-sandbox'],
executablePath: process.env.PUPPETEER_EXEC_PATH, // set by docker container
});
page = await browser.newPage();

// Set the SOCS cookie for YouTube (cookie banner)
Expand Down

0 comments on commit 1e7612c

Please sign in to comment.