Skip to content

Commit

Permalink
[Add] Portal check
Browse files Browse the repository at this point in the history
  • Loading branch information
da-oleg-ignatiev committed Jun 4, 2024
1 parent f737f83 commit d8d0e00
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pages/portal-page.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import { Page } from 'playwright';
import { expect, Page, Locator } from '@playwright/test';

export class PortalPage {
private page: Page;
private portalHeader: Locator;

constructor(page: Page) {
this.page = page;
this.portalHeader = page.locator("css=[data-control='BrandLogo']");

}

// Add your methods and actions for the portal page here

async navigateToPortal() {
// Implement the logic to navigate to the portal page
async portalHeaderIsDisplayed() {
await expect(this.portalHeader).toBeVisible();
}

async performSomeAction() {
// Implement the logic to perform some action on the portal page
}

// Add more methods as needed
}
3 changes: 3 additions & 0 deletions tests/oleg.test.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { test } from '@playwright/test';
import { LoginPage } from '../pages/login-page.js';
import { PortalPage } from '../pages/portal-page.js';

// @ts-check

test('ScoreSense', async ({ page }) => {
const loginPage = new LoginPage(page);
const portalPage = new PortalPage(page);
await loginPage.goto();
await loginPage.login();
await portalPage.portalHeaderIsDisplayed();
});

0 comments on commit d8d0e00

Please sign in to comment.