Skip to content

Commit 3b5d793

Browse files
committed
Add auto-detection of Chrome path instead of hardcoding it.
1 parent 41e3d03 commit 3b5d793

6 files changed

Lines changed: 8 additions & 6 deletions

File tree

vite-iwa-template/package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vite-iwa-template/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"test": "tsc && jest"
1313
},
1414
"devDependencies": {
15+
"@puppeteer/browsers": "^2.10.10",
1516
"@types/jest": "^30.0.0",
1617
"@types/trusted-types": "^2.0.7",
1718
"dompurify": "^3.2.6",

vite-iwa-template/tests/e2e-tests.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,15 @@ describe("E2E Tests", () => {
1616
let manifestID: string;
1717

1818
const bundlePath = path.join(process.cwd(), "dist", "iwa-template.swbn");
19-
const flags = "--enable-features=IsolatedWebApps,IsolatedWebAppDevMode";
2019
test("IWA Should be installed and launched correctly", async () => {
2120
const bundleContent = new Uint8Array(await fs.promises.readFile(bundlePath));
2221
manifestID = wbnSign.getBundleId(bundleContent);
2322

2423
browser = await puppeteer.launch({
25-
executablePath: "/usr/bin/google-chrome",
24+
executablePath: puppeteer.executablePath('chrome'),
2625
headless: false,
2726
pipe: true,
28-
args: [flags],
27+
args: ["--enable-features=IsolatedWebApps,IsolatedWebAppDevMode"],
2928
});
3029

3130
session = await browser.target().createCDPSession();

webpack-iwa-template/package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webpack-iwa-template/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
},
1313
"license": "Apache-2.0",
1414
"devDependencies": {
15+
"@puppeteer/browsers": "^2.10.10",
1516
"@types/jest": "^30.0.0",
1617
"@types/trusted-types": "^2.0.7",
1718
"copy-webpack-plugin": "^13.0.0",

webpack-iwa-template/tests/e2e-tests.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,15 @@ describe("E2E Tests", () => {
1616
let manifestID: string;
1717

1818
const bundlePath = path.join(process.cwd(), "dist", "iwa-template.swbn");
19-
const flags = "--enable-features=IsolatedWebApps,IsolatedWebAppDevMode";
2019
test("IWA Should be installed and launched correctly", async () => {
2120
const bundleContent = new Uint8Array(await fs.promises.readFile(bundlePath));
2221
manifestID = wbnSign.getBundleId(bundleContent);
2322

2423
browser = await puppeteer.launch({
25-
executablePath: "/usr/bin/google-chrome",
24+
executablePath: puppeteer.executablePath('chrome'),
2625
headless: false,
2726
pipe: true,
28-
args: [flags],
27+
args: ["--enable-features=IsolatedWebApps,IsolatedWebAppDevMode"],
2928
});
3029

3130
session = await browser.target().createCDPSession();

0 commit comments

Comments
 (0)