Skip to content

Commit

Permalink
chore: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
arein committed Dec 22, 2023
1 parent 8d1a86a commit dfacac2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions apps/laboratory/tests/connect.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { DEFAULT_SESSION_PARAMS } from './shared/constants'
import { testMW } from './shared/fixtures/w3m-wallet-fixture'

testMW.beforeEach(async ({ modalPage, walletPage }) => {
testMW.beforeEach(async ({ modalPage, walletPage, modalValidator, walletValidator }) => {
await modalPage.copyConnectUriToClipboard()
await walletPage.connect()
await walletPage.handleSessionProposal(DEFAULT_SESSION_PARAMS)
await modalValidator.expectConnected()
await walletValidator.expectConnected()
})

testMW.afterEach(async ({ modalPage, modalValidator, walletValidator }) => {
Expand All @@ -13,15 +15,10 @@ testMW.afterEach(async ({ modalPage, modalValidator, walletValidator }) => {
await walletValidator.expectDisconnected()
})

testMW(
'Should connect and sign',
testMW('it should sign',
async ({ modalPage, walletPage, modalValidator, walletValidator }) => {
await modalValidator.expectConnected()
await walletValidator.expectConnected()

// Sign
await modalPage.sign()
await walletValidator.expectRecievedSign({})
await walletValidator.expectReceivedSign({})
await walletPage.handleRequest({ accept: true })
await modalValidator.expectAcceptedSign()
}
Expand Down
2 changes: 1 addition & 1 deletion apps/laboratory/tests/shared/validators/WalletValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class WalletValidator {
await expect(this.page.getByTestId('session-card')).not.toBeVisible()
}

async expectRecievedSign({ chainName = 'Ethereum' }) {
async expectReceivedSign({ chainName = 'Ethereum' }) {
await expect(this.page.getByTestId('session-approve-button')).toBeVisible()
await expect(this.page.getByTestId('request-details-chain')).toHaveText(chainName)
}
Expand Down

0 comments on commit dfacac2

Please sign in to comment.