@atomicsmash/test-utils 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ export declare const getLighthouseTest: (logInUser: AuthenticatePageFunction) =>
17
17
  port: number;
18
18
  }>;
19
19
  type LighthouseTestFunction = Parameters<ReturnType<typeof getLighthouseTest>>[1];
20
- export declare const doLighthouseTest: (pageToTest: PageList[number], type: "desktop" | "mobile") => LighthouseTestFunction;
20
+ export declare const doLighthouseTest: (pageToTest: PageList[number], type: "desktop" | "mobile", disableAuditLogs?: boolean) => LighthouseTestFunction;
21
21
  export declare function checkAccessibility(page: Page, { includes, excludes, }?: {
22
22
  includes?: SerialFrameSelector[];
23
23
  excludes?: SerialFrameSelector[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,IAAI,EACJ,cAAc,EACd,oBAAoB,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAapD,MAAM,MAAM,QAAQ,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B,EAAE,CAAC;AAEJ,MAAM,MAAM,wBAAwB,GAAG,CACtC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,EACxB,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,KAC3B,OAAO,CAAC,IAAI,CAAC,CAAC;AAEnB,eAAO,MAAM,wBAAwB,EAAE,oBAAoB,CAAC,UAAU,CA2BrE,CAAC;AAEF,eAAO,MAAM,iBAAiB,cAAe,wBAA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,CAAC,UAAU,CA2BrE,CAAC;AAEF,eAAO,MAAM,iBAAiB,cAAe,wBAAwB;uBAE9C,IAAI;aAAW,cAAc;;UAC1C,MAAM;EA2Bf,CAAC;AAEF,KAAK,sBAAsB,GAAG,UAAU,CACvC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CACpC,CAAC,CAAC,CAAC,CAAC;AAEL,eAAO,MAAM,gBAAgB,EAAE,CAC9B,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,EAC5B,IAAI,EAAE,SAAS,GAAG,QAAQ,EAC1B,gBAAgB,CAAC,EAAE,OAAO,KACtB,sBA8BH,CAAC;AAEH,wBAAsB,kBAAkB,CACvC,IAAI,EAAE,IAAI,EACV,EACC,QAAQ,EACR,QAAQ,GACR,GAAE;IACF,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;CAC5B,iBA6BN;AAED,eAAO,MAAM,oBAAoB;UAEP,IAAI;mBAS5B,CAAC;AACH,eAAO,MAAM,kBAAkB;uBAEqB,IAAI;mBAStD,CAAC"}
package/dist/index.js CHANGED
@@ -62,7 +62,7 @@ export const getLighthouseTest = (logInUser) => {
62
62
  lighthouseTest.describe.configure({ mode: "parallel", retries: 3 });
63
63
  return lighthouseTest;
64
64
  };
65
- export const doLighthouseTest = (pageToTest, type) => async function ({ port, authenticatedPage }) {
65
+ export const doLighthouseTest = (pageToTest, type, disableAuditLogs = false) => async function ({ port, authenticatedPage }) {
66
66
  await authenticatedPage.goto(pageToTest.url);
67
67
  await playAudit({
68
68
  page: authenticatedPage,
@@ -84,6 +84,7 @@ export const doLighthouseTest = (pageToTest, type) => async function ({ port, au
84
84
  ? lighthouseDesktopConfig
85
85
  : lighthouseMobileConfig),
86
86
  ignoreError: true,
87
+ disableLogs: disableAuditLogs,
87
88
  });
88
89
  await authenticatedPage.goto(`file://${process.cwd()}/lighthouse/latest-lighthouse-report/${pageToTest.slug ?? slugify(pageToTest.name)}-${type}.html`);
89
90
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomicsmash/test-utils",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "description": "A collection of helper functions for automated testing with Playwright.",
6
6
  "keywords": [