Skip to content

Commit

Permalink
chore: upgrate mm tools
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomrdias committed Oct 24, 2024
1 parent 47df94c commit 7cf5e34
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 33 deletions.
2 changes: 1 addition & 1 deletion packages/adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"devDependencies": {
"@playwright/test": "^1.48.1",
"@types/node": "^22.7.9",
"metamask-testing-tools": "^2.0.1",
"metamask-testing-tools": "^2.1.0",
"typescript": "5.6.3"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/snap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"@playwright/test": "^1.48.1",
"@types/react": "18.2.14",
"@types/react-dom": "18.2.4",
"metamask-testing-tools": "^2.0.1",
"metamask-testing-tools": "^2.1.0",
"playwright-test": "^14.1.6",
"type-fest": "^4.26.1",
"typescript": "5.6.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/snap/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default defineConfig({
timeout: process.env.CI ? 60 * 1000 : 30 * 1000,
forbidOnly: Boolean(process.env.CI),
retries: process.env.CI ? 2 : 1,
workers: process.env.CI ? 1 : 1,
workers: process.env.CI ? 1 : undefined,
reporter: process.env.CI ? [['html'], ['list']] : 'list',
use: {
baseURL: 'http://example.org',
Expand Down
6 changes: 2 additions & 4 deletions packages/snap/test/configure.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ test.describe('fil_configure', () => {
page,
})

const dialog = await metamask.waitForDialog('confirmation')
await dialog.getByTestId('confirmation-submit-button').click()
await metamask.waitForConfirmation()

const response = await req
expect(response.result).toStrictEqual({
Expand All @@ -51,8 +50,7 @@ test.describe('fil_configure', () => {
page,
})

const dialog = await metamask.waitForDialog('confirmation')
await dialog.getByTestId('confirmation-submit-button').click()
await metamask.waitForConfirmation()

const response = await req
expect(response.result).toStrictEqual({
Expand Down
4 changes: 1 addition & 3 deletions packages/snap/test/gas-estimate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ test.beforeAll(async ({ metamask, page }) => {
page,
})

const dialog = await metamask.waitForDialog('confirmation')
await dialog.getByTestId('confirmation-submit-button').click()

await metamask.waitForConfirmation()
await req
})
test.describe('fil_getGasForMessage', () => {
Expand Down
3 changes: 1 addition & 2 deletions packages/snap/test/mainnet.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ test.beforeAll(async ({ metamask, page }) => {
page,
})

const dialog = await metamask.waitForDialog('confirmation')
await dialog.getByTestId('confirmation-submit-button').click()
await metamask.waitForConfirmation()

await req
})
Expand Down
18 changes: 6 additions & 12 deletions packages/snap/test/methods.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ test.beforeAll(async ({ metamask, page }) => {
page,
})

const dialog = await metamask.waitForDialog('confirmation')
await dialog.getByTestId('confirmation-submit-button').click()
await metamask.waitForConfirmation()
await req
})

Expand Down Expand Up @@ -73,10 +72,8 @@ test.describe('filsnap testnet', () => {
page,
})

let popup = await metamask.waitForDialog('confirmation')
await popup.getByTestId('confirmation-submit-button').click()
popup = await metamask.waitForDialog('confirmation')
await popup.getByTestId('confirmation-submit-button').click()
await metamask.waitForConfirmation()
await metamask.waitForConfirmation()

const { result } = await privateKey

Expand All @@ -103,8 +100,7 @@ test.describe('filsnap testnet', () => {
page,
})

const popup = await metamask.waitForDialog('confirmation')
await popup.getByTestId('confirmation-submit-button').click()
await metamask.waitForConfirmation()
const { result } = await signRaw

expect(result).toStrictEqual(
Expand Down Expand Up @@ -140,8 +136,7 @@ test.describe('filsnap testnet', () => {
page,
})

const popup = await metamask.waitForDialog('confirmation')
await popup.getByTestId('confirmation-submit-button').click()
await metamask.waitForConfirmation()
const { result } = await sign

if (result == null) {
Expand Down Expand Up @@ -178,8 +173,7 @@ test.describe('filsnap testnet', () => {
page,
})

const popup = await metamask.waitForDialog('confirmation')
await popup.getByTestId('confirmation-submit-button').click()
await metamask.waitForConfirmation()
const signedMessageResponse = await invoke

if (signedMessageResponse.error != null) {
Expand Down
40 changes: 31 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7cf5e34

Please sign in to comment.