Skip to content

Commit

Permalink
test(cat-voices): refactoring playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
emiride committed Nov 1, 2024
1 parent 599d10a commit 077d3f1
Show file tree
Hide file tree
Showing 24 changed files with 1,067 additions and 493 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,5 @@ test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
extensions/
extensions/
catalyst_voices_packages/catalyst_cardano/catalyst_cardano/wallet-automation/.env

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ deps:

src:
FROM +deps
COPY keys.txt .
COPY --dir pages ./pages
COPY --dir tests ./tests
COPY --dir utils ./utils
COPY playwright.config.ts .
COPY global-setup.ts .
COPY wallet-tests.spec.ts .
COPY utils.ts .
COPY test-fixtures.ts .

package-test:
FROM +src
ENV APP_URL http://app:80
ENV APP_URL http://test-app:80
RUN mkdir /results
VOLUME /results
ENTRYPOINT ["/bin/sh", "-c", "/usr/bin/xvfb-run --auto-servernum npm test", ""]
Expand Down Expand Up @@ -51,9 +51,7 @@ nightly-test:
WITH DOCKER \
--compose compose.yml \
--load test-app:latest=(+package-app) \
--load test:latest=(+package-test) \
--service app \
--allow-privileged
--load test:latest=(+package-test)

RUN docker run --network=default_default --name=test test:latest && \

Check failure on line 56 in catalyst_voices_packages/catalyst_cardano/catalyst_cardano/wallet-automation/Earthfile

View workflow job for this annotation

GitHub Actions / Generate test reports

Error

The command WITH DOCKER RUN --privileged docker run --network=default_default --name=test test:latest && docker cp test:/results/cardano-wallet.junit-report.xml cardano-wallet.junit-report.xml did not complete successfully. Exit code 1
docker cp test:/results/cardano-wallet.junit-report.xml cardano-wallet.junit-report.xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ docker-compose up
```
The app should be running on `localhost:8000`.

6. You can now
6. You can now run tests with the following command:

```sh
npx playwright test
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: "3"
services:
app:
test-app:
image: test-app:latest
ports:
- 8000:80
- "8000:80"

This file was deleted.

This file was deleted.

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

Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@
},
"homepage": "https://github.com/input-output-hk/catalyst-voices#readme",
"devDependencies": {
"@playwright/test": "^1.45.3",
"@playwright/test": "^1.48.0",
"@types/node": "^20.14.12"
},
"dependencies": {
"@tomjs/unzip-crx": "^1.1.3",
"@types/node-fetch": "^2.6.11",
"dotenv": "^16.3.1",
"fs-extra": "^11.2.0",
"install": "^0.13.0",
"node-fetch": "^2.6.7",
"playwright": "^1.45.3",
"playwright": "^1.48.0",
"unzip-crx-3": "^0.2.0"
}
}
Loading

0 comments on commit 077d3f1

Please sign in to comment.