@uxf/e2e 11.47.1 → 11.48.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/config.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const BASE_URL: string;
package/config.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.BASE_URL = void 0;
5
+ exports.BASE_URL = (_a = process.env.BASE_URL) !== null && _a !== void 0 ? _a : "https://fe.uxf.dev";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/e2e",
3
- "version": "11.47.1",
3
+ "version": "11.48.0",
4
4
  "description": "UXF TestCafe helpers",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -10,14 +10,15 @@
10
10
  "compile": "tsc -P tsconfig.json",
11
11
  "e2e": "../../node_modules/.bin/testcafe chrome ./tests",
12
12
  "e2e:dev": "../../node_modules/.bin/testcafe chrome ./tests --live",
13
+ "e2e:ci": "../../node_modules/.bin/testcafe chrome:headless ./tests",
13
14
  "typecheck": "../../node_modules/.bin/tsc --noEmit --skipLibCheck"
14
15
  },
15
16
  "author": "UX Fans s.r.o",
16
17
  "license": "MIT",
17
18
  "devDependencies": {
18
- "testcafe": "3.6.2"
19
+ "testcafe": "3.7.0"
19
20
  },
20
21
  "peerDependencies": {
21
- "testcafe": "3.6.2"
22
+ "testcafe": "3.7.0"
22
23
  }
23
24
  }
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Button")
7
- .page("https://fe.uxf.dev/examples/ui/button/Default")
8
+ .page(config_1.BASE_URL + "/examples/ui/button/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Checkbox button")
7
- .page("https://fe.uxf.dev/examples/ui/checkbox-button/Default")
8
+ .page(config_1.BASE_URL + "/examples/ui/checkbox-button/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Checkbox input")
7
- .page("https://fe.uxf.dev/examples/ui/checkbox-input/Default")
8
+ .page(config_1.BASE_URL + "/examples/ui/checkbox-input/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Combobox")
7
- .page("https://fe.uxf.dev/examples/form/combobox/Default")
8
+ .page(config_1.BASE_URL + "/examples/form/combobox/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Date picker input")
7
- .page("https://fe.uxf.dev/examples/ui/date-picker-input/Default")
8
+ .page(config_1.BASE_URL + "/examples/ui/date-picker-input/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Datetime picker input")
7
- .page("https://fe.uxf.dev/examples/ui/datetime-picker-input/Default")
8
+ .page(config_1.BASE_URL + "/examples/ui/datetime-picker-input/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Dropzone")
7
- .page("https://fe.uxf.dev/examples/ui/dropzone/Default")
8
+ .page(config_1.BASE_URL + "/examples/ui/dropzone/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
+ const config_1 = require("../config");
4
5
  const button_1 = require("../ui/button");
5
6
  const flash_message_1 = require("../ui/flash-message");
6
7
  const wait_for_react_1 = require("../utils/wait-for-react");
7
8
  (0, testcafe_1.fixture)("Flash message")
8
- .page("https://fe.uxf.dev/examples/ui/flash-messages/Default")
9
+ .page(config_1.BASE_URL + "/examples/ui/flash-messages/Default")
9
10
  .httpAuth({ username: "uxf", password: "uxf" })
10
11
  .beforeEach(async (t) => {
11
12
  await (0, wait_for_react_1.waitForReact)(10000, t);
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Icon button")
7
- .page("https://fe.uxf.dev/examples/ui/icon-button/Default")
8
+ .page(config_1.BASE_URL + "/examples/ui/icon-button/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
@@ -2,23 +2,24 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Message")
7
- .page("https://fe.uxf.dev/examples/ui/message/Default")
8
+ .page(config_1.BASE_URL + "/examples/ui/message/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
11
12
  });
12
- (0, testcafe_1.test)("UI Message", async () => {
13
+ (0, testcafe_1.test)("UI Message", async (t) => {
13
14
  await components_1.components.button({ text: "Click to open centered default confirm" }).click();
14
15
  await components_1.components.message({}).shouldExist();
15
16
  await components_1.components.button({ text: "Zrušit" }).shouldExists();
16
17
  await components_1.components.button({ text: "Potvrdit" }).shouldExists();
17
18
  await components_1.components.button({ text: "Potvrdit" }).click();
18
19
  await components_1.components.message({}).shouldNotExist();
19
- //message nejde zavřít klikem mimo
20
+ //message nejde zavřít klikem mimo ni
20
21
  await components_1.components.button({ text: "Click to open centered default confirm" }).click();
21
22
  await components_1.components.modal({}).shouldExist();
22
- await components_1.components.button({ text: "Click to open centered default confirm" }).click();
23
+ await t.click("body", { offsetX: 0, offsetY: 0 });
23
24
  await components_1.components.modal({}).shouldExist();
24
25
  });
@@ -2,14 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Modal")
7
- .page("https://fe.uxf.dev/examples/ui/modal/Default")
8
+ .page(config_1.BASE_URL + "/examples/ui/modal/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
11
12
  });
12
- (0, testcafe_1.test)("UI Modal", async () => {
13
+ (0, testcafe_1.test)("UI Modal", async (t) => {
13
14
  await components_1.components.button({ text: "Click to open modal - default" }).click();
14
15
  await components_1.components.modal({}).shouldExist();
15
16
  await components_1.components.button({ text: "Close modal" }).click();
@@ -17,6 +18,6 @@ const wait_for_react_1 = require("../utils/wait-for-react");
17
18
  //modal jde zavřít klikem mimo něj
18
19
  await components_1.components.button({ text: "Click to open modal - default" }).click();
19
20
  await components_1.components.modal({}).shouldExist();
20
- await components_1.components.button({ text: "Click to open modal - default" }).click();
21
+ await t.click("body", { offsetX: 0, offsetY: 0 });
21
22
  await components_1.components.modal({}).shouldNotExist();
22
23
  });
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Multi combobox")
7
- .page("https://fe.uxf.dev/examples/ui/multi-combobox/Default")
8
+ .page(config_1.BASE_URL + "/examples/ui/multi-combobox/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Radio Group")
7
- .page("https://fe.uxf.dev/examples/ui/radio-group/Default")
8
+ .page(config_1.BASE_URL + "/examples/ui/radio-group/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
@@ -2,10 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const select_1 = require("../ui/select");
6
7
  const wait_for_react_1 = require("../utils/wait-for-react");
7
8
  (0, testcafe_1.fixture)("Select")
8
- .page("https://fe.uxf.dev/examples/ui/select/Default")
9
+ .page(config_1.BASE_URL + "/examples/ui/select/Default")
9
10
  .httpAuth({ username: "uxf", password: "uxf" })
10
11
  .beforeEach(async (t) => {
11
12
  await (0, wait_for_react_1.waitForReact)(10000, t);
@@ -4,12 +4,12 @@ const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
5
  const wait_for_react_1 = require("../utils/wait-for-react");
6
6
  (0, testcafe_1.fixture)("Menu")
7
- .page("https://uxf-base.uxf.dev/admin")
7
+ .page("https://uxf-base.uxf.dev/admin/login")
8
8
  .httpAuth({ username: "uxf", password: "uxf" })
9
9
  .beforeEach(async (controller) => {
10
10
  await (0, wait_for_react_1.waitForReact)(10000, controller);
11
11
  });
12
- (0, testcafe_1.test)("Menu desktop", async () => {
12
+ testcafe_1.test.skip("Menu desktop", async () => {
13
13
  await components_1.components.textInput({ name: "username" }).type("root@uxf.cz");
14
14
  await components_1.components.textInput({ name: "password" }).type("root");
15
15
  await components_1.components.button({ text: "Přihlásit se" }).click();
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Text input")
7
- .page("https://fe.uxf.dev/examples/ui/text-input/Default")
8
+ .page(config_1.BASE_URL + "/examples/ui/text-input/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Text Link")
7
- .page("https://fe.uxf.dev/examples/ui/text-link/Default")
8
+ .page(config_1.BASE_URL + "/examples/ui/text-link/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Textarea")
7
- .page("https://fe.uxf.dev/examples/ui/textarea/Default")
8
+ .page(config_1.BASE_URL + "/examples/ui/textarea/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
@@ -2,19 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testcafe_1 = require("testcafe");
4
4
  const components_1 = require("../components");
5
+ const config_1 = require("../config");
5
6
  const wait_for_react_1 = require("../utils/wait-for-react");
6
7
  (0, testcafe_1.fixture)("Toggle")
7
- .page("https://fe.uxf.dev/examples/ui/toggle/Default")
8
+ .page(config_1.BASE_URL + "/examples/ui/toggle/Default")
8
9
  .httpAuth({ username: "uxf", password: "uxf" })
9
10
  .beforeEach(async (t) => {
10
11
  await (0, wait_for_react_1.waitForReact)(10000, t);
11
12
  });
12
13
  (0, testcafe_1.test)("UI Toggle", async () => {
13
- await components_1.components.toggle({ text: "Opravdu?" }).shouldExists();
14
+ await components_1.components.toggle({ text: "Default" }).shouldExists();
14
15
  await components_1.components.toggle({ text: "example?" }).shouldNotExists();
15
- await components_1.components.toggle({ text: "Opravdu?" }).shouldNotBeDisabled();
16
- await components_1.components.toggle({ text: "Opravdu?" }).shouldBeSelected();
17
- await components_1.components.toggle({ text: "Opravdu?" }).click();
18
- await components_1.components.toggle({ text: "Opravdu?" }).shouldNotBeSelected();
16
+ await components_1.components.toggle({ text: "Default" }).shouldNotBeDisabled();
17
+ await components_1.components.toggle({ text: "Default" }).shouldBeSelected();
18
+ await components_1.components.toggle({ text: "Default" }).click();
19
+ await components_1.components.toggle({ text: "Default" }).shouldNotBeSelected();
19
20
  await components_1.components.toggle({ text: "Disabled" }).shouldBeDisabled();
20
21
  });