Skip to content

Commit

Permalink
Merge pull request #1 from javicoin/synpress_integration
Browse files Browse the repository at this point in the history
Synpress integration with Cucumber hooks & POM
  • Loading branch information
javicoin authored Oct 30, 2023
2 parents 26c0641 + 009c77b commit e0fcd61
Show file tree
Hide file tree
Showing 11 changed files with 12,901 additions and 1,141 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules/
/playwright-report/
/playwright/.cache/
/backup_tests/
config/.env
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ Follow the below commands

- Install dependencies `npm i`

- Create a `.env` file inside `config` containing MetaMask configutarion. Example:
```
secretWordsOrPrivateKey=test test test test test test test test test test test junk
network=optimism
password=Tester@1234
```

- Execute `test` or `npm test` script to run the tests using chromium

- Generated reports located at "test-results" folder

## Next steps short term
- PageObject pattern
- Hooks
- Multi browser support
- Synpress - ongoing
- Playwright wrappers & helpers
- Synpress
- XRay integration

## Sources
Expand Down
16 changes: 16 additions & 0 deletions config/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { fileURLToPath } from 'url';
import path from 'path';
import dotenv from 'dotenv';
import { expect } from "@playwright/test";

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const envPath = path.resolve(__dirname, '.env');
dotenv.config({ path: envPath });

Object.assign(global, {
expect: expect,
BASE_URL: 'https://wallet.testnet.rollup.rif.technology/',
SECRET: process.env.secretWordsOrPrivateKey,
NETWORK: process.env.network,
PASSWORD: process.env.password
});
3 changes: 3 additions & 0 deletions cucumber.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"src/test/features"
],
"import": [
"src/hooks/fixtures.js",
"config/config.js",
"src/hooks/hooks.js",
"src/test/steps/*.steps.js"
],
"dryRun": false,
Expand Down
Loading

0 comments on commit e0fcd61

Please sign in to comment.