Skip to content

Commit

Permalink
Merge branch 'dev' into ahmed/switch-account-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
neuodev authored May 2, 2023
2 parents 6f81db8 + 6aadbfc commit 262d4d0
Show file tree
Hide file tree
Showing 21 changed files with 1,037 additions and 5,938 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/audit_and_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ jobs:
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v2

- name: Audit dependencies
run:
audit-ci --critical --report-type full --allowlist loader-utils
underscore
run: audit-ci --critical --report-type full

- name: Lockfile lint
run:
lockfile-lint -p yarn.lock --type yarn --allowed-schemes "https:"
"git+https:" --empty-hostname false
lockfile-lint -p yarn.lock --type yarn --allowed-hosts yarn
--validate-https --empty-hostname false

build:
needs: audit
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ tests/e2e/videos
tests/e2e/videos-ci
tests/e2e/screenshots

images/demo.gif
images/synpress.png
images/

examples
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ COPY package.json ./
COPY yarn.lock ./

FROM base as test

RUN yarn --frozen-lockfile --prefer-offline --no-audit

COPY . .
91 changes: 62 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,42 @@

#

<p align="center" >
<img src="https://i.imgur.com/Bg8Rch6.png" height="200" />
<p align="center">
<a href="https://github.com/Synthetixio/synpress">Synpress</a>
is E2E testing framework <br/> based on <a href="https://www.cypress.io/">Cypress</a>
and <a href="https://playwright.dev/">Playwright</a>
with support for <a href="https://metamask.io/">MetaMask</a>.
</p>
</p>

<p align="center">
<img src="https://i.imgur.com/Bg8Rch6.png" />
<i>Sponsored & used by: </i> <br/> <br/>
<a href="https://github.com/Synthetixio"><img src="./images/synthetix.png" height="100" alt="Synthetix" /></a>
<a href="https://github.com/ethereum-optimism"><img src="./images/optimism-logo.png" height="100" alt="Optimism" /></a>
</p>

#
<p align="center">
<i>Power users:</i> <br/> </br>
<a href="https://github.com/phantom"><img src="./images/phantom.png" height="85" alt="Phantom"/></a>
<a href="https://github.com/ensdomains"><img src="./images/ens.png" height="85" alt="Ethereum Name Service (ENS)" /></a>
<a href="https://github.com/Kwenta"><img src="./images/kwenta.png" height="100" alt="Kwenta" /></a>
<br/>
<a href="https://github.com/pantherprotocol"><img src="./images/panther.png" height="100" alt="Panther Protocol" /></a>
<a href="https://github.com/agoraxyz"><img src="./images/guild.png" height="90" alt="Guild" /></a>
<br/>
<a href="https://github.com/OffchainLabs"><img src="./images/offchain-labs.png" height="100" alt="Offchain Labs" /></a>
<a href="https://github.com/snapshot-labs"><img src="./images/snapshot-labs.png" height="90" alt="Snapshot Labs" /></a>
<a href="https://github.com/hashgraph"><img src="./images/hedera.png" height="100" alt="Hedera" /></a>
</p>
</p>

<img align="right" src="./images/demo.gif" width="60%" title="Synpress Demo" alt="Synpress Demo">
#

[Synpress](https://github.com/Synthetixio/synpress) is e2e testing framework
based on [Cypress](https://github.com/cypress-io/cypress) and
[Playwright](https://playwright.dev/) with support for
[MetaMask](https://metamask.io/).
<p align="center">
<img src="./images/demo.gif" title="Synpress Demo" alt="Synpress Demo" style="margin-bottom: 10px;">
</p>

Synpress makes sure to always use latest version of metamask and puts a lot of
effort to make sure that dapp tests are stable and trustful.
Expand All @@ -32,9 +56,18 @@ it directly. Check
[usage examples](https://github.com/Synthetixio/synpress/#usage-examples) for
more details.

## Install

```bash
# with yarn
yarn add -D @synthetixio/synpress
# with npm
npm install --save-dev @synthetixio/synpress
```

## Supported frameworks

- [synpress](https://github.com/Synthetixio/synpress)
- [Synpress](https://github.com/Synthetixio/synpress)
- [Playwright](https://playwright.dev/) (as a plugin)
- [Cypress](https://github.com/cypress-io/cypress) (as a plugin)

Expand Down Expand Up @@ -371,28 +404,28 @@ Options:

## Environmental variables

| Variable | Description |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `SECRET_WORDS` | Space separated words for the test wallet recovery phrase (mnemonic; 12 words) |
| `PRIVATE_KEY` | Test wallet private key |
| `NETWORK_NAME` | Network name (eg `NETWORK_NAME=Optimism`) |
| `RPC_URL` | Network RPC (eg`RPC_URL=https://mainnet.optimism.io`) |
| `CHAIN_ID` | Network ID (eg`CHAIN_ID=10`) |
| `SYMBOL` | Native chain token ticker (eg `SYMBOL=OP`) |
| `IS_TESTNET` | `boolean` indicates that the added network is testnet |
| `BLOCK_EXPLORER` | Blockchain explorer (eg `BLOCK_EXPLORER=https://optimistic.etherscan.io/`) |
| `SYNDEBUG` | Set debugging mode to be on |
| `STABLE_MODE` | Introduce delay between main actions, 300ms by default (eg `STABLE_MODE=300ms`, `STABLE_MODE=true`) |
| `SLOW_MODE` | Introduce delay between every action, 50ms by default (eg `SLOW_MODE=true`, `SLOW_MODE=200ms`) |
| `METAMASK_VERSION` | Metamask version to be installed |
| `SKIP_METAMASK_INSTALL` | Will skip MetaMask installation |
| `SKIP_METAMASK_SETUP` | Will skip MetaMask initial setup |
| `GH_USERNAME` | GitHub username (used to avoid rate-limit issue while downloading metamask) |
| Variable | Description |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `SECRET_WORDS` | Space separated words for the test wallet recovery phrase (mnemonic; 12 words) |
| `PRIVATE_KEY` | Test wallet private key |
| `NETWORK_NAME` | Network name (eg `NETWORK_NAME=Optimism`) |
| `RPC_URL` | Network RPC (eg`RPC_URL=https://mainnet.optimism.io`) |
| `CHAIN_ID` | Network ID (eg`CHAIN_ID=10`) |
| `SYMBOL` | Native chain token ticker (eg `SYMBOL=OP`) |
| `IS_TESTNET` | `boolean` indicates that the added network is testnet |
| `BLOCK_EXPLORER` | Blockchain explorer (eg `BLOCK_EXPLORER=https://optimistic.etherscan.io/`) |
| `SYNDEBUG` | Set debugging mode to be on |
| `STABLE_MODE` | Introduce delay between main actions, 300ms by default (eg `STABLE_MODE=300ms`, `STABLE_MODE=true`) |
| `SLOW_MODE` | Introduce delay between every action, 50ms by default (eg `SLOW_MODE=true`, `SLOW_MODE=200ms`) |
| `METAMASK_VERSION` | Metamask version to be installed |
| `SKIP_METAMASK_INSTALL` | Will skip MetaMask installation |
| `SKIP_METAMASK_SETUP` | Will skip MetaMask initial setup |
| `GH_USERNAME` | GitHub username (used to avoid rate-limit issue while downloading metamask) |
| `GH_PAT` | GitHub [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) (used to avoid rate-limit issue while downloading metamask) |
| `ETHERSCAN_KEY` | [Etherscan key](https://info.etherscan.com/etherscan-developer-api-key/) (used only for etherscan-related commands) |
| `FAIL_ON_ERROR` | Fail a test if there are any browser console errors |
| `CYPRESS_GROUP` | [Group tests](https://docs.cypress.io/guides/guides/command-line#cypress-run-group-lt-name-gt) |
| `CI` | `boolean` value indicate that tests are runing from CI/CD pipeline |
| `ETHERSCAN_KEY` | [Etherscan key](https://info.etherscan.com/etherscan-developer-api-key/) (used only for etherscan-related commands) |
| `FAIL_ON_ERROR` | Fail a test if there are any browser console errors |
| `CYPRESS_GROUP` | [Group tests](https://docs.cypress.io/guides/guides/command-line#cypress-run-group-lt-name-gt) |
| `CI` | `boolean` value indicate that tests are runing from CI/CD pipeline |

## 🚢 Release process

Expand Down
127 changes: 0 additions & 127 deletions commands/synthetix.js

This file was deleted.

23 changes: 0 additions & 23 deletions docs/synpress-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,29 +421,6 @@ setupMetamask(
): Chainable<Subject>;
```

#### `cy.snxExchangerSettle()`

Execute settle on Exchanger contract.

```ts
snxExchangerSettle(
asset: string,
walletAddress: string,
privateKey: string,
): Chainable<Subject>;
```

#### `cy.snxCheckWaitingPeriod()`

Check waiting period on Exchanger contract.

```ts
snxCheckWaitingPeriod(
asset: string,
walletAddress: string,
): Chainable<Subject>;
```

#### `cy.etherscanGetTransactionStatus()`

Get transaction status from Etherscan API.
Expand Down
Binary file added images/ens.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/guild.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hedera.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/kwenta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/offchain-labs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/optimism-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/panther.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/phantom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/snapshot-labs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/synthetix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 262d4d0

Please sign in to comment.