Skip to content

Commit

Permalink
test:webwallet
Browse files Browse the repository at this point in the history
  • Loading branch information
canlopes committed Nov 25, 2024
1 parent 00cc01e commit 23f7eb3
Show file tree
Hide file tree
Showing 64 changed files with 1,585 additions and 3,549 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
E2E_REPO_TOKEN: ${{ secrets.E2E_REPO_TOKEN }}
E2E_REPO_OWNER: ${{ secrets.E2E_REPO_OWNER }}
E2E_REPO_RELEASE_NAME: ${{ secrets.E2E_REPO_RELEASE_NAME }}
WW_EMAIL: ${{ secrets.WW_EMAIL }}
WW_LOGIN_PASSWORD: ${{ secrets.WW_LOGIN_PASSWORD }}
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }}

steps:
- name: Checkout code
Expand Down Expand Up @@ -62,7 +65,7 @@ jobs:
fi
sleep 1
done
xvfb-run --auto-servernum pnpm test
xvfb-run --auto-servernum pnpm test:webwallet
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: always()
Expand Down
3 changes: 1 addition & 2 deletions e2e/src/config.ts → e2e/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ import path from "path"
import dotenv from "dotenv"
import fs from "fs"

const envPath = path.resolve(__dirname || "", "../.env")
const envPath = path.resolve(__dirname || "", ".env")
if (fs.existsSync(envPath)) {
dotenv.config({ path: envPath })
}

const commonConfig = {
isProdTesting: process.env.ARGENT_X_ENVIRONMENT === "prod" ? true : false || "",
password: "MyP@ss3!",
Expand Down
1 change: 1 addition & 0 deletions e2e/node_modules/@types/fs-extra

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

1 change: 1 addition & 0 deletions e2e/node_modules/@types/imap-simple

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

1 change: 1 addition & 0 deletions e2e/node_modules/@types/mailparser

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

2 changes: 1 addition & 1 deletion e2e/node_modules/@types/node

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

1 change: 1 addition & 0 deletions e2e/node_modules/@types/nodemailer

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

1 change: 1 addition & 0 deletions e2e/node_modules/axios

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

1 change: 1 addition & 0 deletions e2e/node_modules/fs-extra

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

1 change: 1 addition & 0 deletions e2e/node_modules/imap-simple

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

1 change: 1 addition & 0 deletions e2e/node_modules/mailparser

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

1 change: 1 addition & 0 deletions e2e/node_modules/nodemailer

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

16 changes: 14 additions & 2 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"peerDependencies": {
"@scure/base": "^1.1.1",
"@scure/bip39": "^1.2.1",
"axios": "^1.7.7",
"fs-extra": "^11.2.0",
"lodash-es": "^4.17.21",
"object-hash": "^3.0.0",
"react": "^18.0.0",
Expand All @@ -15,15 +17,25 @@
"zod": "^3.23.8"
},
"devDependencies": {
"@types/axios": "^0.14.0",
"@playwright/test": "^1.48.1",
"@types/axios": "^0.14.0",
"@types/fs-extra": "^11.0.4",
"@types/imap-simple": "^4.2.9",
"@types/mailparser": "^3.4.5",
"@types/node": "^22.0.0",
"@types/nodemailer": "^6.4.17",
"@types/uuid": "^10.0.0",
"dotenv": "^16.3.1",
"starknet": "6.11.0",
"uuid": "^11.0.0"
},
"scripts": {
"test": "pnpm playwright test "
"test:argentx": "pnpm playwright test --project=ArgentX",
"test:webwallet": "pnpm playwright test --project=WebWallet"
},
"dependencies": {
"imap-simple": "^5.1.0",
"mailparser": "^3.7.1",
"nodemailer": "^6.9.16"
}
}
21 changes: 18 additions & 3 deletions e2e/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PlaywrightTestConfig } from "@playwright/test"
import config from "./src/config"
import config from "./config"

const playwrightConfig: PlaywrightTestConfig = {
projects: [
Expand All @@ -13,7 +13,22 @@ const playwrightConfig: PlaywrightTestConfig = {
},
timeout: config.isCI ? 5 * 60e3 : 1 * 60e3,
expect: { timeout: 2 * 60e3 }, // 2 minute
testDir: "./src/specs",
testDir: "./src/argent-x/specs",
testMatch: /\.spec.ts$/,
retries: config.isCI ? 1 : 0,
outputDir: config.artifactsDir,
},
{
name: "WebWallet",
use: {
trace: "retain-on-failure",
actionTimeout: 120 * 1000, // 2 minute
permissions: ["clipboard-read", "clipboard-write"],
screenshot: "only-on-failure",
},
timeout: config.isCI ? 5 * 60e3 : 1 * 60e3,
expect: { timeout: 2 * 60e3 }, // 2 minute
testDir: "./src/webwallet/specs",
testMatch: /\.spec.ts$/,
retries: config.isCI ? 1 : 0,
outputDir: config.artifactsDir,
Expand All @@ -29,7 +44,7 @@ const playwrightConfig: PlaywrightTestConfig = {
forbidOnly: config.isCI,
outputDir: config.artifactsDir,
preserveOutput: "failures-only",
globalTeardown: "./src/utils/global.teardown.ts",
// globalTeardown: "./src/utils/global.teardown.ts",
}

export default playwrightConfig
11 changes: 0 additions & 11 deletions e2e/src/fixtures.ts

This file was deleted.

3 changes: 0 additions & 3 deletions e2e/src/languages/ILanguage.ts

This file was deleted.

162 changes: 0 additions & 162 deletions e2e/src/languages/en/index.ts

This file was deleted.

8 changes: 0 additions & 8 deletions e2e/src/languages/index.ts

This file was deleted.

Loading

0 comments on commit 23f7eb3

Please sign in to comment.