Skip to content

Commit

Permalink
Merge pull request #15 from cardanoapi/tests/wallet-connect
Browse files Browse the repository at this point in the history
test: add test 5A and 5B for connect/disconnect wallet
  • Loading branch information
kneerose authored Nov 12, 2024
2 parents 611ca56 + 36c11f0 commit 921d6c9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions integration_test/lib/pages/loginPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default class LoginPage {
}

async logout(): Promise<void> {
await this.connectWalletBtn.first().click();
await this.disconnectWalletBtn.click();
}

Expand Down
26 changes: 26 additions & 0 deletions integration_test/tests/5-wallet-connect/walletConnect.spec.ts
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();
});

0 comments on commit 921d6c9

Please sign in to comment.