Skip to content

Commit

Permalink
fix: add unzip-crx-3 snippet to global-setup.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
alicechaitea committed Feb 16, 2024
1 parent 5b9c787 commit c94be62
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/wallet-automation/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ src:
# Define a test target that builds upon deps
test:
FROM +src
RUN python3 convert-to-zip.py && xvfb-run -a npx playwright test typhon-wallet-registration.spec.ts
RUN xvfb-run -a npx playwright test typhon-wallet-registration.spec.ts
6 changes: 6 additions & 0 deletions tests/wallet-automation/global-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,11 @@ test('downloadFile test', async ({ page }) => {
throw new Error('downloaded file does not exist.');
};

const unzip = require("unzip-crx-3");
const crxFile = `${downloadedFilePath}`;

unzip(crxFile).then(() => {
console.log("successfully unzipped your crx file..");
});
});

37 changes: 36 additions & 1 deletion tests/wallet-automation/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tests/wallet-automation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"playwright": "^1.41.1",
"playwright-extra": "^4.3.6",
"playwright-extra-plugin-stealth": "^0.0.1",
"puppeteer-extra-plugin-stealth": "^2.11.2"
"puppeteer-extra-plugin-stealth": "^2.11.2",
"unzip-crx-3": "^0.2.0"
}
}
2 changes: 1 addition & 1 deletion tests/wallet-automation/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default defineConfig({
{
name: 'setup',
testMatch: [
/wallet\-setup\.ts/,
/global\-setup\.ts/,
],
},
{
Expand Down

0 comments on commit c94be62

Please sign in to comment.