diff --git a/integration_test/lib/pages/loginPage.ts b/integration_test/lib/pages/loginPage.ts index b60eea5..c6b2f20 100644 --- a/integration_test/lib/pages/loginPage.ts +++ b/integration_test/lib/pages/loginPage.ts @@ -19,6 +19,7 @@ export default class LoginPage { } async logout(): Promise { + await this.connectWalletBtn.first().click(); await this.disconnectWalletBtn.click(); } diff --git a/integration_test/tests/5-wallet-connect/walletConnect.spec.ts b/integration_test/tests/5-wallet-connect/walletConnect.spec.ts new file mode 100644 index 0000000..b926712 --- /dev/null +++ b/integration_test/tests/5-wallet-connect/walletConnect.spec.ts @@ -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(); +});