Skip to content

Commit

Permalink
Unskip tests for *MetamaskToAddNetwork and *MetamaskToSwitchNetwork
Browse files Browse the repository at this point in the history
  • Loading branch information
duckception committed Aug 16, 2023
1 parent f506616 commit b5485f3
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
14 changes: 14 additions & 0 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,19 @@ services:
networks:
- x11

foundry-metamask-test-dapp:
profiles:
- foundry
container_name: foundry
image: synthetixio/foundry:457bb48776c3b14de232d9dda620ba9188dc40ac-base
# Port and chain id as required by the MetaMask Test Dapp
command: [ 'anvil --no-cors --port 8546 --chain-id 1338' ]
environment:
- ANVIL_IP_ADDR=0.0.0.0
ports:
- '8546:8546'
networks:
- x11

networks:
x11:
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,19 @@ services:
networks:
- x11

foundry-metamask-test-dapp:
profiles:
- foundry
container_name: foundry
image: synthetixio/foundry:457bb48776c3b14de232d9dda620ba9188dc40ac-base
# Port and chain id as required by the MetaMask Test Dapp
command: [ 'anvil --no-cors --port 8546 --chain-id 1338' ]
environment:
- ANVIL_IP_ADDR=0.0.0.0
ports:
- '8546:8546'
networks:
- x11

networks:
x11:
11 changes: 5 additions & 6 deletions tests/e2e/specs/metamask-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,25 +436,24 @@ describe('Metamask', () => {
expect(approved).to.be.true;
});
});
// todo: this feature is broken inside test-dapp, needs to be fixed (unable to switch to DAI chain)
it.skip(`rejectMetamaskToAddNetwork should reject permission to add network`, () => {
it(`rejectMetamaskToAddNetwork should reject permission to add network`, () => {
cy.get('#addEthereumChain').click();
cy.rejectMetamaskToAddNetwork().then(rejected => {
expect(rejected).to.be.true;
});
});
it.skip(`allowMetamaskToAddNetwork should approve permission to add network`, () => {
it(`allowMetamaskToAddNetwork should approve permission to add network`, () => {
cy.get('#addEthereumChain').click();
cy.allowMetamaskToAddNetwork('close').then(approved => {
cy.allowMetamaskToAddNetwork().then(approved => {
expect(approved).to.be.true;
});
});
it.skip(`rejectMetamaskToSwitchNetwork should reject permission to switch network`, () => {
it(`rejectMetamaskToSwitchNetwork should reject permission to switch network`, () => {
cy.rejectMetamaskToSwitchNetwork().then(rejected => {
expect(rejected).to.be.true;
});
});
it.skip(`allowMetamaskToSwitchNetwork should approve permission to switch network`, () => {
it(`allowMetamaskToSwitchNetwork should approve permission to switch network`, () => {
cy.get('#switchEthereumChain').click();
cy.allowMetamaskToSwitchNetwork().then(approved => {
expect(approved).to.be.true;
Expand Down

0 comments on commit b5485f3

Please sign in to comment.