-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from cardanoapi/tests/wallet-connect
test: add test 5A and 5B for connect/disconnect wallet
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
integration_test/tests/5-wallet-connect/walletConnect.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { setAllureEpic } from '@helpers/allure'; | ||
import LoginPage from '@pages/loginPage'; | ||
import { test } from '@fixtures/walletExtension'; | ||
import { organizerWallet } from '@constants/staticWallets'; | ||
import { expect } from '@playwright/test'; | ||
|
||
test.beforeEach(async () => { | ||
await setAllureEpic('5. Wallet connect'); | ||
}); | ||
test.use({ wallet: organizerWallet }); | ||
|
||
test('5A. Should connect wallet if stake key is registered', async ({ | ||
page, | ||
}) => { | ||
const loginPage = new LoginPage(page); | ||
await loginPage.login(); | ||
await loginPage.isLoggedIn(); | ||
}); | ||
|
||
test('5B. Should disconnect Wallet When connected', async ({ page }) => { | ||
const loginPage = new LoginPage(page); | ||
await loginPage.login(); | ||
|
||
await loginPage.logout(); | ||
await expect(page.getByTestId('create-poll-button').first()).toBeVisible(); | ||
}); |