Skip to content

Commit

Permalink
pageObject/fixture paradigm
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-bompart committed May 30, 2024
1 parent 16687ba commit 361c73c
Show file tree
Hide file tree
Showing 6 changed files with 309 additions and 239 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import {Page} from '@playwright/test';

export class AtomicCommerceLoadMoreProductsLocators {
private page: Page;
constructor(page: Page) {
this.page = page;
}

summary({index, total}: {index?: number; total?: number} = {}) {
return this.page.getByText(
new RegExp(
`Showing ${index ?? '\\d'} of ${total ?? '\\d'} result${total === 1 ? '' : 's'}.`
)
);
}

get loadMoreButton() {
return this.page.getByText('Load more results');
}
}

This file was deleted.

Loading

0 comments on commit 361c73c

Please sign in to comment.