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

🔥 chore(fixtures): Remove extensionId cache #989

Merged
Merged
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
9 changes: 2 additions & 7 deletions packages/fixtures/src/fixtures/testWithSynpress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ type PublicSynpressFixtures = {
type SynpressFixtures = TestFixtures & PrivateSynpressFixtures & PublicSynpressFixtures

// TODO: Bad practice. Use a store!
let _extensionId: string
let _metamaskPage: Page

const synpressFixtures = (
Expand Down Expand Up @@ -87,13 +86,9 @@ const synpressFixtures = (
await context.close()
},
extensionId: async ({ context }, use) => {
if (_extensionId) {
await use(_extensionId)
}

_extensionId = await getExtensionId(context, 'MetaMask')
const extensionId = await getExtensionId(context, 'MetaMask')

await use(_extensionId)
await use(extensionId)
},
metamaskPage: async ({ context: _ }, use) => {
await use(_metamaskPage)
Expand Down