Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ fix: Properly exported Cypress for metamask #1207

Merged
merged 1 commit into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:*",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this expected?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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'
Loading