Skip to content

Commit

Permalink
chore: expect unAuthenticated on siwe tests (#2939)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomiir authored Sep 26, 2024
1 parent 6faa782 commit 10c0e3c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ test('it should switch networks and sign', async () => {
const chainName = 'Polygon'

await page.switchNetwork(chainName)
await validator.expectUnauthenticated()
await page.promptSiwe()
await page.approveSign()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ test.afterAll(async () => {
test('it should switch networks and sign siwe', async () => {
const chainName = 'Polygon'
await modalPage.switchNetwork(chainName)
await modalValidator.expectUnauthenticated()
await modalPage.promptSiwe()
await walletPage.handleRequest({ accept: true })
await modalValidator.expectAuthenticated()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ test('it should switch networks and sign', async () => {
const chainName = 'Polygon'

await page.switchNetwork(chainName)
await validator.expectUnauthenticated()
await page.promptSiwe()
await page.approveSign()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ test('it should switch networks and sign', async () => {
const chainName = 'Polygon'

await page.switchNetwork(chainName)
await validator.expectUnauthenticated()
await page.promptSiwe()
await page.approveSign()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ test.afterAll(async () => {
test('it should switch networks and sign siwe', async () => {
const chainName = 'Polygon'
await modalPage.switchNetwork(chainName)
await modalValidator.expectUnauthenticated()
await modalPage.promptSiwe()
await walletPage.handleRequest({ accept: true })
await modalValidator.expectAuthenticated()
Expand Down
2 changes: 2 additions & 0 deletions apps/laboratory/tests/siwe-email.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ emailSiweTest('it should reject sign', async () => {
emailSiweTest('it should switch network and sign', async () => {
let targetChain = 'Polygon'
await page.switchNetwork(targetChain)
await validator.expectUnauthenticated()
await page.promptSiwe()
await page.approveSign()

Expand All @@ -77,6 +78,7 @@ emailSiweTest('it should switch network and sign', async () => {

targetChain = 'Ethereum'
await page.switchNetwork(targetChain)
await validator.expectUnauthenticated()
await page.promptSiwe()
await page.approveSign()

Expand Down

0 comments on commit 10c0e3c

Please sign in to comment.