@uxf/e2e 11.72.0 → 11.74.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.
Files changed (107) hide show
  1. package/package.json +1 -1
  2. package/cms/menu.d.ts +0 -8
  3. package/cms/menu.js +0 -33
  4. package/components.d.ts +0 -52
  5. package/components.js +0 -55
  6. package/config.d.ts +0 -1
  7. package/config.js +0 -5
  8. package/index.d.ts +0 -2
  9. package/index.js +0 -18
  10. package/tests/button.e2e.d.ts +0 -1
  11. package/tests/button.e2e.js +0 -19
  12. package/tests/checkbox-button.e2e.d.ts +0 -1
  13. package/tests/checkbox-button.e2e.js +0 -19
  14. package/tests/checkbox-input.e2e.d.ts +0 -1
  15. package/tests/checkbox-input.e2e.js +0 -22
  16. package/tests/combobox.e2e.d.ts +0 -1
  17. package/tests/combobox.e2e.js +0 -32
  18. package/tests/datagrid-v2.e2e.d.ts +0 -1
  19. package/tests/datagrid-v2.e2e.js +0 -231
  20. package/tests/date-picker-input.e2e.d.ts +0 -1
  21. package/tests/date-picker-input.e2e.js +0 -28
  22. package/tests/date-time-picker-input.e2e.d.ts +0 -1
  23. package/tests/date-time-picker-input.e2e.js +0 -27
  24. package/tests/dropzone.e2e.d.ts +0 -1
  25. package/tests/dropzone.e2e.js +0 -96
  26. package/tests/flash-message.e2e.d.ts +0 -1
  27. package/tests/flash-message.e2e.js +0 -19
  28. package/tests/icon-button.e2e.d.ts +0 -1
  29. package/tests/icon-button.e2e.js +0 -20
  30. package/tests/message.e2e.d.ts +0 -1
  31. package/tests/message.e2e.js +0 -25
  32. package/tests/modal.e2e.d.ts +0 -1
  33. package/tests/modal.e2e.js +0 -23
  34. package/tests/multi-combobox.e2e.d.ts +0 -1
  35. package/tests/multi-combobox.e2e.js +0 -25
  36. package/tests/multi-select.e2e.d.ts +0 -1
  37. package/tests/multi-select.e2e.js +0 -32
  38. package/tests/radio-group.e2e.d.ts +0 -1
  39. package/tests/radio-group.e2e.js +0 -17
  40. package/tests/select.e2e.d.ts +0 -1
  41. package/tests/select.e2e.js +0 -26
  42. package/tests/sidebar-menu.e2e.d.ts +0 -1
  43. package/tests/sidebar-menu.e2e.js +0 -41
  44. package/tests/text-input.e2e.d.ts +0 -1
  45. package/tests/text-input.e2e.js +0 -25
  46. package/tests/text-link.e2e.d.ts +0 -1
  47. package/tests/text-link.e2e.js +0 -17
  48. package/tests/textarea.e2e.d.ts +0 -1
  49. package/tests/textarea.e2e.js +0 -22
  50. package/tests/toggle.e2e.d.ts +0 -1
  51. package/tests/toggle.e2e.js +0 -21
  52. package/tests/toolbar-tab.e2e.d.ts +0 -1
  53. package/tests/toolbar-tab.e2e.js +0 -20
  54. package/ui/button-group.d.ts +0 -10
  55. package/ui/button-group.js +0 -20
  56. package/ui/button-list.d.ts +0 -8
  57. package/ui/button-list.js +0 -16
  58. package/ui/button.d.ts +0 -13
  59. package/ui/button.js +0 -33
  60. package/ui/checkbox-button.d.ts +0 -11
  61. package/ui/checkbox-button.js +0 -22
  62. package/ui/checkbox-input.d.ts +0 -12
  63. package/ui/checkbox-input.js +0 -28
  64. package/ui/combobox.d.ts +0 -19
  65. package/ui/combobox.js +0 -58
  66. package/ui/date-picker-input.d.ts +0 -16
  67. package/ui/date-picker-input.js +0 -40
  68. package/ui/datetime-picker-input.d.ts +0 -16
  69. package/ui/datetime-picker-input.js +0 -38
  70. package/ui/dropzone.d.ts +0 -25
  71. package/ui/dropzone.js +0 -70
  72. package/ui/flash-message.d.ts +0 -8
  73. package/ui/flash-message.js +0 -19
  74. package/ui/icon-button.d.ts +0 -13
  75. package/ui/icon-button.js +0 -39
  76. package/ui/input.d.ts +0 -14
  77. package/ui/input.js +0 -31
  78. package/ui/message.d.ts +0 -5
  79. package/ui/message.js +0 -16
  80. package/ui/modal.d.ts +0 -5
  81. package/ui/modal.js +0 -16
  82. package/ui/multi-combobox.d.ts +0 -15
  83. package/ui/multi-combobox.js +0 -50
  84. package/ui/multi-select.d.ts +0 -17
  85. package/ui/multi-select.js +0 -50
  86. package/ui/radio-group.d.ts +0 -10
  87. package/ui/radio-group.js +0 -29
  88. package/ui/select.d.ts +0 -17
  89. package/ui/select.js +0 -45
  90. package/ui/text-input.d.ts +0 -14
  91. package/ui/text-input.js +0 -29
  92. package/ui/text-link.d.ts +0 -11
  93. package/ui/text-link.js +0 -23
  94. package/ui/textarea.d.ts +0 -14
  95. package/ui/textarea.js +0 -32
  96. package/ui/toggle.d.ts +0 -15
  97. package/ui/toggle.js +0 -46
  98. package/ui/toolbar-tab.d.ts +0 -13
  99. package/ui/toolbar-tab.js +0 -37
  100. package/utils/base-finder.d.ts +0 -3
  101. package/utils/base-finder.js +0 -2
  102. package/utils/create-selector.d.ts +0 -2
  103. package/utils/create-selector.js +0 -8
  104. package/utils/root-selector.d.ts +0 -1
  105. package/utils/root-selector.js +0 -5
  106. package/utils/wait-for-react.d.ts +0 -1
  107. package/utils/wait-for-react.js +0 -52
@@ -1,96 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const testcafe_1 = require("testcafe");
4
- const components_1 = require("../components");
5
- const config_1 = require("../config");
6
- const dropzone_1 = require("../ui/dropzone");
7
- const wait_for_react_1 = require("../utils/wait-for-react");
8
- (0, testcafe_1.fixture)("Dropzone")
9
- .page(config_1.BASE_URL + "/examples/ui/dropzone/Default")
10
- .httpAuth({ username: "uxf", password: "uxf" })
11
- .beforeEach(async (t) => {
12
- await (0, wait_for_react_1.waitForReact)(10000, t);
13
- });
14
- (0, testcafe_1.test)("Dropzone", async (t) => {
15
- const defaultDropzone = components_1.components.dropzone({ name: "dropzone-disabled-drag-and-drop" });
16
- await defaultDropzone.shouldExists();
17
- await (0, dropzone_1.dropzone)({ name: "fake-dropzone" }).shouldNotExists();
18
- await defaultDropzone.shouldNotBeDisabled();
19
- // 2x nahrání souborů a check
20
- await defaultDropzone.uploadFiles(["./Docx-test.docx", "./Jpg-test.jpg"], 20000);
21
- await t.expect((0, testcafe_1.Selector)(".uxf-loader").exists).notOk({ timeout: 20000 });
22
- await defaultDropzone.uploadFiles(["./PDF-test.pdf"], 20000);
23
- await defaultDropzone.uploadedFilesShouldExist(["Docx-test.docx", "Jpg-test.jpg", "PDF-test.pdf"]);
24
- //odstranění souboru a nahrání stejného souboru
25
- await t.setNativeDialogHandler(() => true);
26
- await defaultDropzone.removeUploadedFile("Docx-test.docx");
27
- await defaultDropzone.uploadedFilesShouldNotExist(["Docx-test.docx"]);
28
- await defaultDropzone.uploadFiles(["./Docx-test.docx"], 20000);
29
- await defaultDropzone.uploadedFilesShouldExist(["Docx-test.docx"]);
30
- let dialogHandlersHistory = await t.getNativeDialogHistory();
31
- await t
32
- .expect(dialogHandlersHistory[0].type)
33
- .eql("confirm")
34
- .expect(dialogHandlersHistory[0].text)
35
- .eql("Do you want to delete the file?");
36
- //Disabled
37
- await (0, testcafe_1.ClientFunction)(() => {
38
- document.location.reload();
39
- })();
40
- await t.wait(3000);
41
- await components_1.components.toggle({ text: "Disabled" }).click();
42
- await defaultDropzone.shouldBeDisabled();
43
- await defaultDropzone.uploadFiles(["./Docx-test.docx", "Jpg-test.jpg"], 20000);
44
- await t.expect((0, testcafe_1.Selector)(".uxf-dropzone-list").find(".uxf-dropzone-list__item").exists).notOk();
45
- //Only images upload
46
- await (0, testcafe_1.ClientFunction)(() => {
47
- document.location.reload();
48
- })();
49
- await t.wait(3000);
50
- await components_1.components.toggle({ text: "Only images upload" }).click();
51
- await defaultDropzone.uploadFiles(["./Docx-test.docx", "./Jpg-test.jpg"], 20000);
52
- await defaultDropzone.uploadedFilesShouldExist(["Jpg-test.jpg"]);
53
- await defaultDropzone.uploadedFilesShouldNotExist(["Docx-test.docx"]);
54
- //Limit file count 1
55
- await (0, testcafe_1.ClientFunction)(() => {
56
- document.location.reload();
57
- })();
58
- await t.wait(3000);
59
- await components_1.components.toggle({ text: "Limit file count" }).click();
60
- await defaultDropzone.uploadFiles(["./Docx-test.docx", "Jpg-test.jpg"], 20000);
61
- await t.expect((0, testcafe_1.Selector)(".uxf-dropzone-list").find(".uxf-dropzone-list__item").exists).notOk();
62
- await defaultDropzone.uploadFiles(["Jpg-test.jpg"], 20000);
63
- await defaultDropzone.uploadedFilesShouldExist(["Jpg-test.jpg"]);
64
- await defaultDropzone.uploadedFilesShouldNotExist(["Docx-test.docx"]);
65
- dialogHandlersHistory = await t.getNativeDialogHistory();
66
- await t
67
- .expect(dialogHandlersHistory[0].type)
68
- .eql("alert")
69
- .expect(dialogHandlersHistory[0].text)
70
- .eql("Bylo nahráno příliš mnoho souborů. Maximální počet souborů je 1");
71
- //Limit file size 1MB
72
- await (0, testcafe_1.ClientFunction)(() => {
73
- document.location.reload();
74
- })();
75
- await t.wait(3000);
76
- await components_1.components.toggle({ text: "Limit file size" }).click();
77
- await defaultDropzone.uploadFiles(["./PNG-test.png"], 20000);
78
- await t.expect((0, testcafe_1.Selector)(".uxf-dropzone-list").find(".uxf-dropzone-list__item").exists).notOk();
79
- await defaultDropzone.uploadFiles(["Jpg-test.jpg"], 20000);
80
- await defaultDropzone.uploadedFilesShouldExist(["Jpg-test.jpg"]);
81
- await defaultDropzone.uploadedFilesShouldNotExist(["PNG-test.png"]);
82
- dialogHandlersHistory = await t.getNativeDialogHistory();
83
- await t
84
- .expect(dialogHandlersHistory[0].type)
85
- .eql("alert")
86
- .expect(dialogHandlersHistory[0].text)
87
- .eql("Tyto soubory jsou příliš velké a nebyly nahrány: PNG-test.png");
88
- //Limit increase
89
- await (0, testcafe_1.ClientFunction)(() => {
90
- document.location.reload();
91
- })();
92
- await components_1.components.toggle({ text: "Limit file size" }).click();
93
- await components_1.components.input({ name: "limit-file-size" }).replace("2");
94
- await defaultDropzone.uploadFiles(["./PNG-test.png", "./Jpg-test.jpg"], 20000);
95
- await defaultDropzone.uploadedFilesShouldExist(["PNG-test.png", "Jpg-test.jpg"]);
96
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const testcafe_1 = require("testcafe");
4
- const config_1 = require("../config");
5
- const button_1 = require("../ui/button");
6
- const flash_message_1 = require("../ui/flash-message");
7
- const wait_for_react_1 = require("../utils/wait-for-react");
8
- (0, testcafe_1.fixture)("Flash message")
9
- .page(config_1.BASE_URL + "/examples/ui/flash-messages/Default")
10
- .httpAuth({ username: "uxf", password: "uxf" })
11
- .beforeEach(async (t) => {
12
- await (0, wait_for_react_1.waitForReact)(10000, t);
13
- });
14
- (0, testcafe_1.test)("Flash message", async () => {
15
- await (0, flash_message_1.flashMessage)().shouldNotExists();
16
- await (0, button_1.button)({ text: "Click to fire Flash message, variant success" }).click();
17
- await (0, flash_message_1.flashMessage)().shouldExists(1000);
18
- await (0, flash_message_1.flashMessage)().shouldContainsText("Everything is alright.", 1000);
19
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const testcafe_1 = require("testcafe");
4
- const components_1 = require("../components");
5
- const config_1 = require("../config");
6
- const wait_for_react_1 = require("../utils/wait-for-react");
7
- (0, testcafe_1.fixture)("Icon button")
8
- .page(config_1.BASE_URL + "/examples/ui/icon-button/Default")
9
- .httpAuth({ username: "uxf", password: "uxf" })
10
- .beforeEach(async (t) => {
11
- await (0, wait_for_react_1.waitForReact)(10000, t);
12
- });
13
- (0, testcafe_1.test)("UI Icon Button", async () => {
14
- await components_1.components.iconButton({ iconName: "icon-sprite--user" }).shouldExists();
15
- await components_1.components.iconButton({ iconName: "whatever-icon" }).shouldNotExists();
16
- await components_1.components.iconButton({ iconName: "icon-sprite--user" }).click();
17
- await components_1.components.iconButton({ iconName: "icon-sprite--user" }).shouldNotBeDisabled();
18
- await components_1.components.toggle({ text: "Disabled" }).click();
19
- await components_1.components.iconButton({ iconName: "icon-sprite--user" }).shouldBeDisabled();
20
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const testcafe_1 = require("testcafe");
4
- const components_1 = require("../components");
5
- const config_1 = require("../config");
6
- const wait_for_react_1 = require("../utils/wait-for-react");
7
- (0, testcafe_1.fixture)("Message")
8
- .page(config_1.BASE_URL + "/examples/ui/message/Default")
9
- .httpAuth({ username: "uxf", password: "uxf" })
10
- .beforeEach(async (t) => {
11
- await (0, wait_for_react_1.waitForReact)(10000, t);
12
- });
13
- (0, testcafe_1.test)("UI Message", async (t) => {
14
- await components_1.components.button({ text: "Click to open centered default confirm" }).click();
15
- await components_1.components.message({}).shouldExist();
16
- await components_1.components.button({ text: "Zrušit" }).shouldExists();
17
- await components_1.components.button({ text: "Potvrdit" }).shouldExists();
18
- await components_1.components.button({ text: "Potvrdit" }).click();
19
- await components_1.components.message({}).shouldNotExist();
20
- //message nejde zavřít klikem mimo ni
21
- await components_1.components.button({ text: "Click to open centered default confirm" }).click();
22
- await components_1.components.modal({}).shouldExist();
23
- await t.click("body", { offsetX: 0, offsetY: 0 });
24
- await components_1.components.modal({}).shouldExist();
25
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const testcafe_1 = require("testcafe");
4
- const components_1 = require("../components");
5
- const config_1 = require("../config");
6
- const wait_for_react_1 = require("../utils/wait-for-react");
7
- (0, testcafe_1.fixture)("ModalProvider")
8
- .page(config_1.BASE_URL + "/examples/ui/modal/ModalProvider")
9
- .httpAuth({ username: "uxf", password: "uxf" })
10
- .beforeEach(async (t) => {
11
- await (0, wait_for_react_1.waitForReact)(10000, t);
12
- });
13
- (0, testcafe_1.test)("UI Modal", async (t) => {
14
- await components_1.components.button({ text: "Click to open modal - default" }).click();
15
- await components_1.components.modal({}).shouldExist(1000);
16
- await components_1.components.button({ text: "Close modal" }).click();
17
- await components_1.components.modal({}).shouldNotExist(1000);
18
- //modal jde zavřít klikem mimo něj
19
- await components_1.components.button({ text: "Click to open modal - default" }).click();
20
- await components_1.components.modal({}).shouldExist(1000);
21
- await t.click("body", { offsetX: 0, offsetY: 0 });
22
- await components_1.components.modal({}).shouldNotExist(1000);
23
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const testcafe_1 = require("testcafe");
4
- const components_1 = require("../components");
5
- const config_1 = require("../config");
6
- const wait_for_react_1 = require("../utils/wait-for-react");
7
- (0, testcafe_1.fixture)("Multi combobox")
8
- .page(config_1.BASE_URL + "/examples/ui/multi-combobox/Default")
9
- .httpAuth({ username: "uxf", password: "uxf" })
10
- .beforeEach(async (t) => {
11
- await (0, wait_for_react_1.waitForReact)(10000, t);
12
- });
13
- (0, testcafe_1.test)("Multi combobox", async () => {
14
- //TODO- dodělat, až bude správná classa na všech comboboxech a data-name u všech comboboxů
15
- const defaultMultiCombobox = components_1.components.multiCombobox({ dataName: "multi-combobox" });
16
- await defaultMultiCombobox.shouldExist(1000);
17
- await defaultMultiCombobox.selectItemFromDropdown("Option red", 1000);
18
- await defaultMultiCombobox.replace("Option green");
19
- await defaultMultiCombobox.selectItemByTypeText("Option four", 1000);
20
- await defaultMultiCombobox.shouldHaveValue("Option red", 1000);
21
- await defaultMultiCombobox.shouldHaveValue("Option four", 1000);
22
- await defaultMultiCombobox.shouldHaveValue("Option green", 1000);
23
- await components_1.components.multiCombobox({ dataName: "multi-combobox-disabled" }).shouldBeDisabled(1000);
24
- await components_1.components.multiCombobox({ dataName: "multi-combobox-invalid" }).shouldBeInvalid(1000);
25
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const testcafe_1 = require("testcafe");
4
- const components_1 = require("../components");
5
- const config_1 = require("../config");
6
- const wait_for_react_1 = require("../utils/wait-for-react");
7
- (0, testcafe_1.fixture)("Multi combobox")
8
- .page(config_1.BASE_URL + "/examples/ui/multi-select/Default")
9
- .httpAuth({ username: "uxf", password: "uxf" })
10
- .beforeEach(async (t) => {
11
- await (0, wait_for_react_1.waitForReact)(10000, t);
12
- });
13
- (0, testcafe_1.test)("Multi select", async () => {
14
- const defaultMultiSelect = components_1.components.multiSelect({ dataName: "multi-select" });
15
- await defaultMultiSelect.shouldExist();
16
- await defaultMultiSelect.selectItemsByText(["Option red", "Option blue", "Option four", "Option green"]);
17
- await defaultMultiSelect.shouldHaveValues(["Option red", "Option blue", "Option four", "Option green"]);
18
- await defaultMultiSelect.selectItemsByIndex([2, 3]);
19
- await defaultMultiSelect.shouldHaveValues([
20
- "Option red",
21
- "Option blue",
22
- "Option four",
23
- "Option seven",
24
- "Option nine",
25
- ]);
26
- await defaultMultiSelect.removeItemsByText(["Option red", "Option blue"]);
27
- await defaultMultiSelect.removeItemsByIndex([2]);
28
- await defaultMultiSelect.shouldNotHaveValues(["Option red", "Option blue"]);
29
- await defaultMultiSelect.shouldHaveValues(["Option four", "Option green", "Option nine"]);
30
- await components_1.components.multiSelect({ dataName: "multi-select-disabled" }).shouldBeDisabled();
31
- await components_1.components.multiSelect({ dataName: "multi-select-invalid" }).shouldBeInvalid();
32
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const testcafe_1 = require("testcafe");
4
- const components_1 = require("../components");
5
- const config_1 = require("../config");
6
- const wait_for_react_1 = require("../utils/wait-for-react");
7
- (0, testcafe_1.fixture)("Radio Group")
8
- .page(config_1.BASE_URL + "/examples/ui/radio-group/Default")
9
- .httpAuth({ username: "uxf", password: "uxf" })
10
- .beforeEach(async (t) => {
11
- await (0, wait_for_react_1.waitForReact)(10000, t);
12
- });
13
- (0, testcafe_1.test)("UI Radio Group", async () => {
14
- await components_1.components.radioGroup({ id: "radiogroup" }).selectByText("Radio two");
15
- await components_1.components.radioGroup({ id: "radiogroup" }).shouldBeSelected("Radio two");
16
- await components_1.components.radioGroup({ id: "radiogroup" }).shouldNotBeSelected("Radio one");
17
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const testcafe_1 = require("testcafe");
4
- const components_1 = require("../components");
5
- const config_1 = require("../config");
6
- const select_1 = require("../ui/select");
7
- const wait_for_react_1 = require("../utils/wait-for-react");
8
- (0, testcafe_1.fixture)("Select")
9
- .page(config_1.BASE_URL + "/examples/ui/select/Default")
10
- .httpAuth({ username: "uxf", password: "uxf" })
11
- .beforeEach(async (t) => {
12
- await (0, wait_for_react_1.waitForReact)(10000, t);
13
- });
14
- (0, testcafe_1.test)("Select", async () => {
15
- const defaultSelect = components_1.components.select({ dataName: "select" });
16
- await defaultSelect.shouldBeEmpty();
17
- await defaultSelect.selectNthItem(2);
18
- await defaultSelect.shouldHaveValue("Option three");
19
- await defaultSelect.shouldNotBeEmpty();
20
- await defaultSelect.shouldExists();
21
- await (0, select_1.select)({ dataName: "test" }).shouldNotExists();
22
- await (0, select_1.select)({ dataName: "select-disabled" }).shouldBeDisabled();
23
- await defaultSelect.shouldNotBeDisabled();
24
- await defaultSelect.selectItemWithText("Option six");
25
- await defaultSelect.shouldHaveValue("Option six");
26
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const testcafe_1 = require("testcafe");
4
- const components_1 = require("../components");
5
- const wait_for_react_1 = require("../utils/wait-for-react");
6
- (0, testcafe_1.fixture)("Menu")
7
- .page("https://uxf-base.uxf.dev/admin/login")
8
- .httpAuth({ username: "uxf", password: "uxf" })
9
- .beforeEach(async (controller) => {
10
- await (0, wait_for_react_1.waitForReact)(10000, controller);
11
- });
12
- testcafe_1.test.skip("Menu desktop", async () => {
13
- await components_1.components.textInput({ name: "username" }).type("root@uxf.cz");
14
- await components_1.components.textInput({ name: "password" }).type("root");
15
- await components_1.components.button({ text: "Přihlásit se" }).click();
16
- await components_1.components.cms.menu().shouldExistsLink("Big test");
17
- await components_1.components.cms.menu().shouldNotExistsLink("Small test");
18
- //main menu item click
19
- await components_1.components.cms.menu().openLink("Big test");
20
- await testcafe_1.t.expect((0, testcafe_1.Selector)("h1").withExactText("Big test").exists).ok();
21
- //hover on main menu and click on sub menu item
22
- await components_1.components.cms.menu().openLink("Obsah", "Články");
23
- await testcafe_1.t.expect((0, testcafe_1.Selector)("h1").withExactText("Články").exists).ok();
24
- //submenu item click
25
- await components_1.components.cms.menu().openLink("Otázky a odpovědi");
26
- await testcafe_1.t.expect((0, testcafe_1.Selector)("h1").withExactText("Otázky a odpovědi").exists).ok();
27
- //user menu item click
28
- await testcafe_1.t.wait(2000);
29
- await components_1.components.cms.menu().openUserMenu();
30
- await components_1.components.cms.menu().openUserMenuLink("Změna hesla");
31
- await testcafe_1.t.expect((0, testcafe_1.Selector)("h1").withExactText("Změna hesla").exists).ok();
32
- });
33
- testcafe_1.test.skip("Menu mobile", async () => {
34
- await testcafe_1.t.resizeWindow(390, 844);
35
- await components_1.components.textInput({ name: "username" }).type("root@uxf.cz");
36
- await components_1.components.textInput({ name: "password" }).type("root");
37
- await components_1.components.button({ text: "Přihlásit se" }).click();
38
- await components_1.components.cms.menu().openBurgerMenu();
39
- await components_1.components.cms.menu().openUserMenuLink("Změna hesla", "mobile");
40
- await testcafe_1.t.expect((0, testcafe_1.Selector)("h1").withExactText("Změna hesla").exists).ok();
41
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const testcafe_1 = require("testcafe");
4
- const components_1 = require("../components");
5
- const config_1 = require("../config");
6
- const wait_for_react_1 = require("../utils/wait-for-react");
7
- (0, testcafe_1.fixture)("Text input")
8
- .page(config_1.BASE_URL + "/examples/ui/text-input/Default")
9
- .httpAuth({ username: "uxf", password: "uxf" })
10
- .beforeEach(async (t) => {
11
- await (0, wait_for_react_1.waitForReact)(10000, t);
12
- });
13
- (0, testcafe_1.test)("Text input", async () => {
14
- const defaultInput = components_1.components.textInput({ name: "default" });
15
- await defaultInput.shouldNotBeDisabled();
16
- await defaultInput.type("Lorem");
17
- await defaultInput.shouldHaveValue("Lorem");
18
- await defaultInput.type(" ipsum");
19
- await defaultInput.shouldHaveValue("Lorem ipsum");
20
- await defaultInput.replace("Replaced value");
21
- await defaultInput.shouldHaveValue("Replaced value");
22
- await defaultInput.shouldExist();
23
- await components_1.components.textInput({ name: "defaultt" }).shouldNotExist();
24
- await components_1.components.textInput({ name: "disabled" }).shouldBeDisabled();
25
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const testcafe_1 = require("testcafe");
4
- const components_1 = require("../components");
5
- const config_1 = require("../config");
6
- const wait_for_react_1 = require("../utils/wait-for-react");
7
- (0, testcafe_1.fixture)("Text Link")
8
- .page(config_1.BASE_URL + "/examples/ui/text-link/Default")
9
- .httpAuth({ username: "uxf", password: "uxf" })
10
- .beforeEach(async (t) => {
11
- await (0, wait_for_react_1.waitForReact)(10000, t);
12
- });
13
- (0, testcafe_1.test)("UI Text Link", async () => {
14
- await components_1.components.textLink({ text: "tímto odkazem" }).shouldExists();
15
- await components_1.components.textLink({ text: "tímto odkazem" }).click();
16
- await components_1.components.textLink({ text: "test" }).shouldNotExists();
17
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const testcafe_1 = require("testcafe");
4
- const components_1 = require("../components");
5
- const config_1 = require("../config");
6
- const wait_for_react_1 = require("../utils/wait-for-react");
7
- (0, testcafe_1.fixture)("Textarea")
8
- .page(config_1.BASE_URL + "/examples/ui/textarea/Default")
9
- .httpAuth({ username: "uxf", password: "uxf" })
10
- .beforeEach(async (t) => {
11
- await (0, wait_for_react_1.waitForReact)(10000, t);
12
- });
13
- (0, testcafe_1.test)("Textarea", async () => {
14
- const defaultTextarea = components_1.components.textarea({ dataName: "text-area" });
15
- await defaultTextarea.shouldNotBeDisabled();
16
- await defaultTextarea.type("Value");
17
- await defaultTextarea.shouldHaveValue("testValue");
18
- await defaultTextarea.replace("suffix");
19
- await defaultTextarea.shouldHaveValue("suffix");
20
- await components_1.components.textarea({ dataName: "text-area-diabled" }).shouldBeDisabled();
21
- await components_1.components.textarea({ dataName: "text-area-read-only" }).shouldBeReadonly();
22
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const testcafe_1 = require("testcafe");
4
- const components_1 = require("../components");
5
- const config_1 = require("../config");
6
- const wait_for_react_1 = require("../utils/wait-for-react");
7
- (0, testcafe_1.fixture)("Toggle")
8
- .page(config_1.BASE_URL + "/examples/ui/toggle/Default")
9
- .httpAuth({ username: "uxf", password: "uxf" })
10
- .beforeEach(async (t) => {
11
- await (0, wait_for_react_1.waitForReact)(10000, t);
12
- });
13
- (0, testcafe_1.test)("UI Toggle", async () => {
14
- await components_1.components.toggle({ text: "Default" }).shouldExists();
15
- await components_1.components.toggle({ text: "example?" }).shouldNotExists();
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();
20
- await components_1.components.toggle({ text: "Disabled" }).shouldBeDisabled();
21
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const testcafe_1 = require("testcafe");
4
- const components_1 = require("../components");
5
- const config_1 = require("../config");
6
- const wait_for_react_1 = require("../utils/wait-for-react");
7
- (0, testcafe_1.fixture)("Toolbar tab")
8
- .page(config_1.BASE_URL + "/examples/data-grid/toolbar-tabs/Default")
9
- .httpAuth({ username: "uxf", password: "uxf" })
10
- .beforeEach(async (t) => {
11
- await (0, wait_for_react_1.waitForReact)(10000, t);
12
- });
13
- (0, testcafe_1.test)("UI Toolbar tab", async () => {
14
- await components_1.components.toolbarTab({ text: "All" }).shouldExists();
15
- await components_1.components.toolbarTab({ text: "Only odd ids blablabla" }).shouldExists();
16
- await components_1.components.toolbarTab({ text: "Not all" }).shouldNotExists();
17
- await components_1.components.toolbarTab({ text: "Only odd ids blablabla" }).click();
18
- await components_1.components.toolbarTab({ text: "Only odd ids blablabla" }).shouldBeActive();
19
- await components_1.components.toolbarTab({ text: "All" }).shouldNotBeActive();
20
- });
@@ -1,10 +0,0 @@
1
- import { BaseFinder } from "../utils/base-finder";
2
- interface ButtonGroupFinder extends BaseFinder {
3
- dataTestId: string;
4
- }
5
- export declare function buttonGroup(finder: ButtonGroupFinder): {
6
- clickOnButtonByText(buttonText: string): TestControllerPromise<any>;
7
- shouldExists(): TestControllerPromise<any>;
8
- shouldExistsButtonByText(text: string): TestControllerPromise<any>;
9
- };
10
- export {};
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buttonGroup = buttonGroup;
4
- const testcafe_1 = require("testcafe");
5
- const create_selector_1 = require("../utils/create-selector");
6
- const button_1 = require("./button");
7
- function buttonGroup(finder) {
8
- const selector = (0, create_selector_1.createSelector)(finder).find(".uxf-button-group").find(`[data-test-id="${finder.dataTestId}"]`);
9
- return {
10
- clickOnButtonByText(buttonText) {
11
- return (0, button_1.button)({ parent: selector, text: buttonText }).click();
12
- },
13
- shouldExists() {
14
- return testcafe_1.t.expect(selector.exists).ok();
15
- },
16
- shouldExistsButtonByText(text) {
17
- return (0, button_1.button)({ parent: selector, text }).shouldExists();
18
- },
19
- };
20
- }
@@ -1,8 +0,0 @@
1
- import { BaseFinder } from "../utils/base-finder";
2
- interface ButtonListFinder extends BaseFinder {
3
- nth?: number;
4
- }
5
- export declare function buttonList(finder: ButtonListFinder): {
6
- clickOnButton(text: string): TestControllerPromise<any>;
7
- };
8
- export {};
package/ui/button-list.js DELETED
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buttonList = buttonList;
4
- const create_selector_1 = require("../utils/create-selector");
5
- const button_1 = require("./button");
6
- function buttonList(finder) {
7
- var _a;
8
- const selector = (0, create_selector_1.createSelector)(finder)
9
- .find(".uxf-button-list")
10
- .nth((_a = finder.nth) !== null && _a !== void 0 ? _a : 0);
11
- return {
12
- clickOnButton(text) {
13
- return (0, button_1.button)({ parent: selector, text }).click();
14
- },
15
- };
16
- }
package/ui/button.d.ts DELETED
@@ -1,13 +0,0 @@
1
- import { BaseFinder } from "../utils/base-finder";
2
- interface ButtonFinder extends BaseFinder {
3
- text: string;
4
- nth?: number;
5
- }
6
- export declare function button(finder: ButtonFinder): {
7
- click(): TestControllerPromise<any>;
8
- shouldExists(): TestControllerPromise<any>;
9
- shouldNotExists(): TestControllerPromise<any>;
10
- shouldBeDisabled(): TestControllerPromise<any>;
11
- shouldNotBeDisabled(): TestControllerPromise<any>;
12
- };
13
- export {};
package/ui/button.js DELETED
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.button = button;
4
- const testcafe_1 = require("testcafe");
5
- const create_selector_1 = require("../utils/create-selector");
6
- function button(finder) {
7
- var _a;
8
- const selector = (0, create_selector_1.createSelector)(finder)
9
- .find(".uxf-button")
10
- .withExactText(finder.text)
11
- .nth((_a = finder.nth) !== null && _a !== void 0 ? _a : 0);
12
- return {
13
- click() {
14
- return testcafe_1.t.click(selector);
15
- },
16
- shouldExists() {
17
- return testcafe_1.t.expect(selector.exists).ok(`Button ${finder.text} should exists but it does not exists`);
18
- },
19
- shouldNotExists() {
20
- return testcafe_1.t.expect(selector.exists).notOk(`Button ${finder.text} should not exists but it exists`);
21
- },
22
- shouldBeDisabled() {
23
- return testcafe_1.t
24
- .expect(selector.hasClass("uxf-button--is-disabled"))
25
- .ok(`Button ${finder.text} should be disabled but is not disabled`);
26
- },
27
- shouldNotBeDisabled() {
28
- return testcafe_1.t
29
- .expect(selector.hasClass("uxf-button--is-disabled"))
30
- .notOk(`Button ${finder.text} should not disabled but is disabled`);
31
- },
32
- };
33
- }
@@ -1,11 +0,0 @@
1
- import { BaseFinder } from "../utils/base-finder";
2
- interface CheckboxButtonFinder extends BaseFinder {
3
- buttonText: string;
4
- }
5
- export declare function checkboxButton(finder: CheckboxButtonFinder): {
6
- click(): TestControllerPromise<any>;
7
- shouldBeChecked(): TestControllerPromise<any>;
8
- shouldNotBeChecked(): TestControllerPromise<any>;
9
- shouldExist(): TestControllerPromise<any>;
10
- };
11
- export {};