@prezly/theme-kit-nextjs 5.1.0 → 5.1.1-alpha.1

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.
@@ -0,0 +1,5 @@
1
+ import type { PlaywrightTestConfig } from '@playwright/test';
2
+ /**
3
+ * See https://playwright.dev/docs/test-configuration.
4
+ */
5
+ export declare const playwrightConfig: PlaywrightTestConfig;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.playwrightConfig = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ /**
6
+ * See https://playwright.dev/docs/test-configuration.
7
+ */
8
+ exports.playwrightConfig = {
9
+ testDir: './tests',
10
+ /* Maximum time one test can run for. */
11
+ timeout: 30 * 1000,
12
+ expect: {
13
+ /**
14
+ * Maximum time expect() should wait for the condition to be met.
15
+ * For example in `await expect(locator).toHaveText();`
16
+ */
17
+ timeout: 5000,
18
+ },
19
+ /* Run tests in files in parallel */
20
+ fullyParallel: true,
21
+ /* Fail the build on CI if you accidentally left test.only in the source code. */
22
+ forbidOnly: !!process.env.CI,
23
+ /* Retry on CI only */
24
+ retries: process.env.CI ? 2 : 0,
25
+ /* Opt out of parallel tests on CI. */
26
+ workers: process.env.CI ? 1 : undefined,
27
+ /* Reporter to use. See https://playwright.dev/docs/test-reporters */
28
+ reporter: 'html',
29
+ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
30
+ use: {
31
+ /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
32
+ actionTimeout: 0,
33
+ /* Base URL to use in actions like `await page.goto('/')`. */
34
+ // eslint-disable-next-line @typescript-eslint/naming-convention
35
+ baseURL: process.env.TESTS_BASE_URL || 'http://localhost:3000',
36
+ /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
37
+ trace: 'on-first-retry',
38
+ video: process.env.CI ? 'retain-on-failure' : 'on',
39
+ },
40
+ /* Configure projects for major browsers */
41
+ projects: [
42
+ {
43
+ name: 'chromium',
44
+ use: {
45
+ ...test_1.devices['Desktop Chrome'],
46
+ },
47
+ },
48
+ {
49
+ name: 'firefox',
50
+ use: {
51
+ ...test_1.devices['Desktop Firefox'],
52
+ },
53
+ },
54
+ {
55
+ name: 'webkit',
56
+ use: {
57
+ ...test_1.devices['Desktop Safari'],
58
+ },
59
+ },
60
+ ],
61
+ };
62
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/playwright/config.ts"],"names":[],"mappings":";;;AAEA,2CAA2C;AAE3C;;GAEG;AACU,QAAA,gBAAgB,GAAyB;IAClD,OAAO,EAAE,SAAS;IAClB,wCAAwC;IACxC,OAAO,EAAE,EAAE,GAAG,IAAI;IAClB,MAAM,EAAE;QACJ;;;WAGG;QACH,OAAO,EAAE,IAAI;KAChB;IACD,oCAAoC;IACpC,aAAa,EAAE,IAAI;IACnB,iFAAiF;IACjF,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;IAC5B,sBAAsB;IACtB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/B,sCAAsC;IACtC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;IACvC,qEAAqE;IACrE,QAAQ,EAAE,MAAM;IAChB,wGAAwG;IACxG,GAAG,EAAE;QACD,oFAAoF;QACpF,aAAa,EAAE,CAAC;QAChB,6DAA6D;QAC7D,gEAAgE;QAChE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,uBAAuB;QAE9D,+FAA+F;QAC/F,KAAK,EAAE,gBAAgB;QACvB,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI;KACrD;IAED,2CAA2C;IAC3C,QAAQ,EAAE;QACN;YACI,IAAI,EAAE,UAAU;YAChB,GAAG,EAAE;gBACD,GAAG,cAAO,CAAC,gBAAgB,CAAC;aAC/B;SACJ;QAED;YACI,IAAI,EAAE,SAAS;YACf,GAAG,EAAE;gBACD,GAAG,cAAO,CAAC,iBAAiB,CAAC;aAChC;SACJ;QAED;YACI,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE;gBACD,GAAG,cAAO,CAAC,gBAAgB,CAAC;aAC/B;SACJ;KACJ;CACJ,CAAC"}
@@ -0,0 +1 @@
1
+ export { playwrightConfig } from './config';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.playwrightConfig = void 0;
4
+ var config_1 = require("./config");
5
+ Object.defineProperty(exports, "playwrightConfig", { enumerable: true, get: function () { return config_1.playwrightConfig; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/playwright/index.ts"],"names":[],"mappings":";;;AAAA,mCAA4C;AAAnC,0GAAA,gBAAgB,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/theme-kit-nextjs",
3
- "version": "5.1.0",
3
+ "version": "5.1.1-alpha.1",
4
4
  "description": "Data layer and utility library for developing Prezly themes with NextJS",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -10,12 +10,16 @@
10
10
  ],
11
11
  "exports": {
12
12
  ".": "./build/index.js",
13
- "./server": "./build/server.js"
13
+ "./server": "./build/server.js",
14
+ "./playwright": "./build/playwright/index.js"
14
15
  },
15
16
  "typesVersions": {
16
17
  "*": {
17
18
  "server": [
18
19
  "build/server.d.ts"
20
+ ],
21
+ "playwright": [
22
+ "build/playwright/index.d.ts"
19
23
  ]
20
24
  }
21
25
  },
@@ -51,11 +55,17 @@
51
55
  "test": "jest"
52
56
  },
53
57
  "peerDependencies": {
58
+ "@playwright/test": "1.x",
54
59
  "@prezly/sdk": ">=12 <16",
55
60
  "next": "^12.x || ^13.x",
56
61
  "react": "^17.x || ^18.x",
57
62
  "react-dom": "^17.x || ^18.x"
58
63
  },
64
+ "peerDependenciesMeta": {
65
+ "@playwright/test": {
66
+ "optional": true
67
+ }
68
+ },
59
69
  "dependencies": {
60
70
  "@prezly/theme-kit-core": "^5.1.0",
61
71
  "next-seo": "^5.4.0"
@@ -67,5 +77,5 @@
67
77
  "access": "public"
68
78
  },
69
79
  "sideEffects": false,
70
- "gitHead": "c18953ebd993d4a450f33151c6ec1eadd143961a"
80
+ "gitHead": "ff777e68973b5b12b9193f143552bf8935f31c9a"
71
81
  }