Skip to content

Commit

Permalink
Merge branch 'main' into dsw-1823-pr-template
Browse files Browse the repository at this point in the history
  • Loading branch information
siggerzz authored Mar 27, 2024
2 parents 2fa8f02 + 5d6c33e commit a084068
Show file tree
Hide file tree
Showing 7 changed files with 190 additions and 103 deletions.
5 changes: 5 additions & 0 deletions .changeset/empty-mice-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@justeattakeaway/pie-icons-react": minor
---

[Added] - Individual entry points
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

import { test, expect } from '@sand4rt/experimental-ct-web';
import { readFile } from 'fs/promises';
import { PieCookieBannerComponent, Level } from 'test/helpers/page-object/pie-cookie-banner.page.ts';
import { PieModalPage } from '@justeattakeaway/pie-modal/test/helpers/page-object/pie-modal.page.ts';
import { CookieBannerComponent, Level } from 'test/helpers/page-object/pie-cookie-banner.page.ts';
import { ModalComponent } from '@justeattakeaway/pie-modal/test/helpers/page-object/pie-modal.page.ts';
import {
ON_COOKIE_BANNER_ACCEPT_ALL, ON_COOKIE_BANNER_NECESSARY_ONLY,
ON_COOKIE_BANNER_MANAGE_PREFS, ON_COOKIE_BANNER_PREFS_SAVED,
Expand All @@ -19,13 +19,13 @@ function stripTags (str: string) {
return str.replace(/<\/?[^>]+(>|$)/g, '');
}

let pieCookieBannerComponent: PieCookieBannerComponent;
let pieModalComponent: PieModalPage;
let pieCookieBannerComponent: CookieBannerComponent;
let pieModalComponent: ModalComponent;

test.describe('PieCookieBanner - Component tests', () => {
test.beforeEach(async ({ page }) => {
pieCookieBannerComponent = new PieCookieBannerComponent(page);
pieModalComponent = new PieModalPage(page);
pieCookieBannerComponent = new CookieBannerComponent(page);
pieModalComponent = new ModalComponent(page);
});

test('should render successfully', async ({ mount }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const getPreferenceItemSelector = (id: PreferenceIds) => `#${id} [data-test-id="

export type Level = 'action' | 'body';

export class PieCookieBannerComponent extends BasePage {
export class CookieBannerComponent extends BasePage {
private readonly componentLocator: Locator;
private readonly descriptionLocator: Locator;
private readonly acceptAllButtonLocator: Locator;
Expand Down
Loading

0 comments on commit a084068

Please sign in to comment.