Skip to content

Commit

Permalink
fix: Properly exported Cypress for metamask (#1207)
Browse files Browse the repository at this point in the history
  • Loading branch information
matstyler authored Aug 31, 2024
1 parent 9f7d994 commit a54e71f
Show file tree
Hide file tree
Showing 8 changed files with 1,043 additions and 976 deletions.
2 changes: 1 addition & 1 deletion examples/new-dawn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"dependencies": {
"@playwright/test": "1.44.0",
"@synthetixio/synpress": "4.0.0-alpha.9",
"@synthetixio/synpress": "workspace:*",
"dotenv": "16.4.2"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/new-dawn/test/cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
// ***********************************************************

// Import commands.js using ES2015 syntax:
import { mockEthereum, synpressCommands } from '@synthetixio/synpress/cypress/support'
import { mockEthereum, synpressCommandsForEthereumWalletMock } from '@synthetixio/synpress/cypress'

synpressCommands()
synpressCommandsForEthereumWalletMock()
mockEthereum()

Cypress.on('uncaught:exception', () => {
Expand Down
1,979 changes: 1,018 additions & 961 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions release/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
"types": "./types/cypress/index.d.ts",
"default": "./dist/cypress/index.js"
},
"./cypress/support": {
"types": "./types/cypress/support.d.ts",
"default": "./dist/cypress/support.js"
},
"./playwright": {
"types": "./types/playwright/index.d.ts",
"default": "./dist/playwright/index.js"
Expand All @@ -38,10 +34,10 @@
"types:check": "tsc --noEmit"
},
"dependencies": {
"@synthetixio/ethereum-wallet-mock": "0.0.1-alpha.9",
"@synthetixio/ethereum-wallet-mock": "workspace:*",
"@synthetixio/synpress-cache": "0.0.1-alpha.9",
"@synthetixio/synpress-core": "0.0.1-alpha.9",
"@synthetixio/synpress-metamask": "0.0.1-alpha.9"
"@synthetixio/synpress-metamask": "workspace:*"
},
"devDependencies": {
"@synthetixio/synpress-tsconfig": "0.0.1-alpha.9",
Expand Down
16 changes: 14 additions & 2 deletions release/src/cypress/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
export * from '@synthetixio/ethereum-wallet-mock/cypress'
export * from '@synthetixio/synpress-metamask/cypress'
export {
configureSynpress as configureSynpressForEthereumWalletMock,
EthereumWalletMock
} from '@synthetixio/ethereum-wallet-mock/cypress'
export {
mockEthereum,
synpressCommands as synpressCommandsForEthereumWalletMock
} from '@synthetixio/ethereum-wallet-mock/cypress/support'
export {
MetaMask,
configureSynpress as configureSynpressForMetaMask,
synpressCommands as synpressCommandsForMetaMask,
initMetaMask
} from '@synthetixio/synpress-metamask/cypress'
1 change: 0 additions & 1 deletion release/src/cypress/support.ts

This file was deleted.

4 changes: 2 additions & 2 deletions wallets/metamask/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"types:check": "tsc --noEmit"
},
"dependencies": {
"@synthetixio/synpress-cache": "0.0.1-alpha.9",
"@synthetixio/synpress-core": "0.0.1-alpha.9",
"@synthetixio/synpress-cache": "workspace:*",
"@synthetixio/synpress-core": "workspace:*",
"@viem/anvil": "0.0.7",
"fs-extra": "11.2.0",
"zod": "3.22.4"
Expand Down
5 changes: 4 additions & 1 deletion wallets/metamask/src/cypress/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
export * from './MetaMask'
export { default as MetaMask } from './MetaMask'
export { default as configureSynpress } from './configureSynpress'
export { default as synpressCommands } from './support/synpressCommands'
export { initMetaMask } from './support/initMetaMask'

0 comments on commit a54e71f

Please sign in to comment.