You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.2 KiB
35 lines
1.2 KiB
import {Page, Locator} from '@playwright/test';
|
|
import {BasePage} from '../../BasePage';
|
|
import {AdminPage} from '../AdminPage';
|
|
|
|
class TopContentCard extends BasePage {
|
|
readonly contentCard: Locator;
|
|
readonly postsAndPagesButton: Locator;
|
|
readonly postsButton: Locator;
|
|
readonly pagesButton: Locator;
|
|
readonly sourcesButton: Locator;
|
|
|
|
constructor(page: Page) {
|
|
super(page);
|
|
|
|
this.contentCard = page.getByTestId('top-content-card');
|
|
this.postsAndPagesButton = this.contentCard.getByRole('tab', {name: 'Posts & pages'});
|
|
this.postsButton = this.contentCard.getByRole('tab', {name: 'Posts', exact: true});
|
|
this.pagesButton = this.contentCard.getByRole('tab', {name: 'Pages', exact: true});
|
|
this.sourcesButton = this.contentCard.getByRole('tab', {name: 'Sources', exact: true});
|
|
}
|
|
}
|
|
|
|
export class AnalyticsGrowthPage extends AdminPage {
|
|
public readonly topContent: TopContentCard;
|
|
public readonly totalMembersCard: Locator;
|
|
|
|
constructor(page: Page) {
|
|
super(page);
|
|
this.pageUrl = '/ghost/#/analytics/growth';
|
|
|
|
this.totalMembersCard = page.getByTestId('total-members-card');
|
|
this.topContent = new TopContentCard(page);
|
|
}
|
|
}
|