@uxf/e2e 11.74.0 → 11.74.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.
- package/README.md +1 -1
- package/cms/menu.d.ts +8 -0
- package/cms/menu.js +33 -0
- package/components.d.ts +52 -0
- package/components.js +55 -0
- package/config.d.ts +1 -0
- package/config.js +5 -0
- package/index.d.ts +2 -0
- package/index.js +18 -0
- package/package.json +1 -1
- package/tests/button.e2e.d.ts +1 -0
- package/tests/button.e2e.js +19 -0
- package/tests/checkbox-button.e2e.d.ts +1 -0
- package/tests/checkbox-button.e2e.js +19 -0
- package/tests/checkbox-input.e2e.d.ts +1 -0
- package/tests/checkbox-input.e2e.js +22 -0
- package/tests/combobox.e2e.d.ts +1 -0
- package/tests/combobox.e2e.js +32 -0
- package/tests/datagrid-v2.e2e.d.ts +1 -0
- package/tests/datagrid-v2.e2e.js +231 -0
- package/tests/date-picker-input.e2e.d.ts +1 -0
- package/tests/date-picker-input.e2e.js +28 -0
- package/tests/date-time-picker-input.e2e.d.ts +1 -0
- package/tests/date-time-picker-input.e2e.js +27 -0
- package/tests/dropzone.e2e.d.ts +1 -0
- package/tests/dropzone.e2e.js +96 -0
- package/tests/flash-message.e2e.d.ts +1 -0
- package/tests/flash-message.e2e.js +19 -0
- package/tests/icon-button.e2e.d.ts +1 -0
- package/tests/icon-button.e2e.js +20 -0
- package/tests/message.e2e.d.ts +1 -0
- package/tests/message.e2e.js +25 -0
- package/tests/modal.e2e.d.ts +1 -0
- package/tests/modal.e2e.js +23 -0
- package/tests/multi-combobox.e2e.d.ts +1 -0
- package/tests/multi-combobox.e2e.js +25 -0
- package/tests/multi-select.e2e.d.ts +1 -0
- package/tests/multi-select.e2e.js +32 -0
- package/tests/radio-group.e2e.d.ts +1 -0
- package/tests/radio-group.e2e.js +17 -0
- package/tests/select.e2e.d.ts +1 -0
- package/tests/select.e2e.js +26 -0
- package/tests/sidebar-menu.e2e.d.ts +1 -0
- package/tests/sidebar-menu.e2e.js +41 -0
- package/tests/text-input.e2e.d.ts +1 -0
- package/tests/text-input.e2e.js +25 -0
- package/tests/text-link.e2e.d.ts +1 -0
- package/tests/text-link.e2e.js +17 -0
- package/tests/textarea.e2e.d.ts +1 -0
- package/tests/textarea.e2e.js +22 -0
- package/tests/toggle.e2e.d.ts +1 -0
- package/tests/toggle.e2e.js +21 -0
- package/tests/toolbar-tab.e2e.d.ts +1 -0
- package/tests/toolbar-tab.e2e.js +20 -0
- package/ui/button-group.d.ts +10 -0
- package/ui/button-group.js +20 -0
- package/ui/button-list.d.ts +8 -0
- package/ui/button-list.js +16 -0
- package/ui/button.d.ts +13 -0
- package/ui/button.js +33 -0
- package/ui/checkbox-button.d.ts +11 -0
- package/ui/checkbox-button.js +22 -0
- package/ui/checkbox-input.d.ts +12 -0
- package/ui/checkbox-input.js +28 -0
- package/ui/combobox.d.ts +19 -0
- package/ui/combobox.js +58 -0
- package/ui/date-picker-input.d.ts +16 -0
- package/ui/date-picker-input.js +40 -0
- package/ui/datetime-picker-input.d.ts +16 -0
- package/ui/datetime-picker-input.js +38 -0
- package/ui/dropzone.d.ts +25 -0
- package/ui/dropzone.js +70 -0
- package/ui/flash-message.d.ts +8 -0
- package/ui/flash-message.js +19 -0
- package/ui/icon-button.d.ts +13 -0
- package/ui/icon-button.js +39 -0
- package/ui/input.d.ts +14 -0
- package/ui/input.js +31 -0
- package/ui/message.d.ts +5 -0
- package/ui/message.js +16 -0
- package/ui/modal.d.ts +5 -0
- package/ui/modal.js +16 -0
- package/ui/multi-combobox.d.ts +15 -0
- package/ui/multi-combobox.js +50 -0
- package/ui/multi-select.d.ts +17 -0
- package/ui/multi-select.js +50 -0
- package/ui/radio-group.d.ts +10 -0
- package/ui/radio-group.js +29 -0
- package/ui/select.d.ts +17 -0
- package/ui/select.js +45 -0
- package/ui/text-input.d.ts +14 -0
- package/ui/text-input.js +29 -0
- package/ui/text-link.d.ts +11 -0
- package/ui/text-link.js +23 -0
- package/ui/textarea.d.ts +14 -0
- package/ui/textarea.js +32 -0
- package/ui/toggle.d.ts +15 -0
- package/ui/toggle.js +46 -0
- package/ui/toolbar-tab.d.ts +13 -0
- package/ui/toolbar-tab.js +37 -0
- package/utils/base-finder.d.ts +3 -0
- package/utils/base-finder.js +2 -0
- package/utils/create-selector.d.ts +2 -0
- package/utils/create-selector.js +8 -0
- package/utils/root-selector.d.ts +1 -0
- package/utils/root-selector.js +5 -0
- package/utils/wait-for-react.d.ts +1 -0
- package/utils/wait-for-react.js +52 -0
package/README.md
CHANGED
package/cms/menu.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function menu(): {
|
|
2
|
+
openLink(mainLabel: string, subLabel?: string, index?: number): TestControllerPromise<any>;
|
|
3
|
+
openBurgerMenu(): TestControllerPromise<any>;
|
|
4
|
+
openUserMenu(): TestControllerPromise<any>;
|
|
5
|
+
openUserMenuLink(userMenuLabel: string, device?: "mobile" | "desktop"): TestControllerPromise<any>;
|
|
6
|
+
shouldExistsLink(label: string): TestControllerPromise<any>;
|
|
7
|
+
shouldNotExistsLink(label: string): TestControllerPromise<any>;
|
|
8
|
+
};
|
package/cms/menu.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.menu = menu;
|
|
4
|
+
const testcafe_1 = require("testcafe");
|
|
5
|
+
const menuLinkFinder = (0, testcafe_1.Selector)(".uxf-cms-menu__item-label");
|
|
6
|
+
function menu() {
|
|
7
|
+
return {
|
|
8
|
+
openLink(mainLabel, subLabel, index = 0) {
|
|
9
|
+
if (!subLabel) {
|
|
10
|
+
return testcafe_1.t.click(menuLinkFinder.withText(mainLabel).nth(index));
|
|
11
|
+
}
|
|
12
|
+
return testcafe_1.t.click(menuLinkFinder.withText(mainLabel)).click(menuLinkFinder.withText(subLabel));
|
|
13
|
+
},
|
|
14
|
+
openBurgerMenu() {
|
|
15
|
+
return testcafe_1.t.click((0, testcafe_1.Selector)(".uxf-cms-mobile-bar__button").nth(-1));
|
|
16
|
+
},
|
|
17
|
+
openUserMenu() {
|
|
18
|
+
return testcafe_1.t.click((0, testcafe_1.Selector)(".uxf-cms-user-menu__button"));
|
|
19
|
+
},
|
|
20
|
+
openUserMenuLink(userMenuLabel, device = "desktop") {
|
|
21
|
+
if (device === "desktop") {
|
|
22
|
+
return testcafe_1.t.click((0, testcafe_1.Selector)(menuLinkFinder).withText(userMenuLabel).nth(1));
|
|
23
|
+
}
|
|
24
|
+
return testcafe_1.t.click((0, testcafe_1.Selector)(menuLinkFinder).withText(userMenuLabel));
|
|
25
|
+
},
|
|
26
|
+
shouldExistsLink(label) {
|
|
27
|
+
return testcafe_1.t.expect(menuLinkFinder.withText(label).exists).ok();
|
|
28
|
+
},
|
|
29
|
+
shouldNotExistsLink(label) {
|
|
30
|
+
return testcafe_1.t.expect(menuLinkFinder.withText(label).exists).notOk();
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
package/components.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { menu } from "./cms/menu";
|
|
2
|
+
import { button } from "./ui/button";
|
|
3
|
+
import { buttonGroup } from "./ui/button-group";
|
|
4
|
+
import { buttonList } from "./ui/button-list";
|
|
5
|
+
import { checkboxButton } from "./ui/checkbox-button";
|
|
6
|
+
import { checkboxInput } from "./ui/checkbox-input";
|
|
7
|
+
import { combobox } from "./ui/combobox";
|
|
8
|
+
import { datePickerInput } from "./ui/date-picker-input";
|
|
9
|
+
import { datetimePickerInput } from "./ui/datetime-picker-input";
|
|
10
|
+
import { dropzone } from "./ui/dropzone";
|
|
11
|
+
import { flashMessage } from "./ui/flash-message";
|
|
12
|
+
import { iconButton } from "./ui/icon-button";
|
|
13
|
+
import { input } from "./ui/input";
|
|
14
|
+
import { message } from "./ui/message";
|
|
15
|
+
import { modal } from "./ui/modal";
|
|
16
|
+
import { multiCombobox } from "./ui/multi-combobox";
|
|
17
|
+
import { multiSelect } from "./ui/multi-select";
|
|
18
|
+
import { radioGroup } from "./ui/radio-group";
|
|
19
|
+
import { select } from "./ui/select";
|
|
20
|
+
import { textInput } from "./ui/text-input";
|
|
21
|
+
import { textLink } from "./ui/text-link";
|
|
22
|
+
import { textarea } from "./ui/textarea";
|
|
23
|
+
import { toggle } from "./ui/toggle";
|
|
24
|
+
import { toolbarTab } from "./ui/toolbar-tab";
|
|
25
|
+
export declare const components: {
|
|
26
|
+
button: typeof button;
|
|
27
|
+
buttonGroup: typeof buttonGroup;
|
|
28
|
+
buttonList: typeof buttonList;
|
|
29
|
+
combobox: typeof combobox;
|
|
30
|
+
datePickerInput: typeof datePickerInput;
|
|
31
|
+
datetimePickerInput: typeof datetimePickerInput;
|
|
32
|
+
dropzone: typeof dropzone;
|
|
33
|
+
flashMessage: typeof flashMessage;
|
|
34
|
+
checkboxButton: typeof checkboxButton;
|
|
35
|
+
checkboxInput: typeof checkboxInput;
|
|
36
|
+
iconButton: typeof iconButton;
|
|
37
|
+
input: typeof input;
|
|
38
|
+
message: typeof message;
|
|
39
|
+
modal: typeof modal;
|
|
40
|
+
multiCombobox: typeof multiCombobox;
|
|
41
|
+
multiSelect: typeof multiSelect;
|
|
42
|
+
radioGroup: typeof radioGroup;
|
|
43
|
+
select: typeof select;
|
|
44
|
+
textarea: typeof textarea;
|
|
45
|
+
textInput: typeof textInput;
|
|
46
|
+
textLink: typeof textLink;
|
|
47
|
+
toggle: typeof toggle;
|
|
48
|
+
toolbarTab: typeof toolbarTab;
|
|
49
|
+
cms: {
|
|
50
|
+
menu: typeof menu;
|
|
51
|
+
};
|
|
52
|
+
};
|
package/components.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.components = void 0;
|
|
4
|
+
const menu_1 = require("./cms/menu");
|
|
5
|
+
const button_1 = require("./ui/button");
|
|
6
|
+
const button_group_1 = require("./ui/button-group");
|
|
7
|
+
const button_list_1 = require("./ui/button-list");
|
|
8
|
+
const checkbox_button_1 = require("./ui/checkbox-button");
|
|
9
|
+
const checkbox_input_1 = require("./ui/checkbox-input");
|
|
10
|
+
const combobox_1 = require("./ui/combobox");
|
|
11
|
+
const date_picker_input_1 = require("./ui/date-picker-input");
|
|
12
|
+
const datetime_picker_input_1 = require("./ui/datetime-picker-input");
|
|
13
|
+
const dropzone_1 = require("./ui/dropzone");
|
|
14
|
+
const flash_message_1 = require("./ui/flash-message");
|
|
15
|
+
const icon_button_1 = require("./ui/icon-button");
|
|
16
|
+
const input_1 = require("./ui/input");
|
|
17
|
+
const message_1 = require("./ui/message");
|
|
18
|
+
const modal_1 = require("./ui/modal");
|
|
19
|
+
const multi_combobox_1 = require("./ui/multi-combobox");
|
|
20
|
+
const multi_select_1 = require("./ui/multi-select");
|
|
21
|
+
const radio_group_1 = require("./ui/radio-group");
|
|
22
|
+
const select_1 = require("./ui/select");
|
|
23
|
+
const text_input_1 = require("./ui/text-input");
|
|
24
|
+
const text_link_1 = require("./ui/text-link");
|
|
25
|
+
const textarea_1 = require("./ui/textarea");
|
|
26
|
+
const toggle_1 = require("./ui/toggle");
|
|
27
|
+
const toolbar_tab_1 = require("./ui/toolbar-tab");
|
|
28
|
+
exports.components = {
|
|
29
|
+
button: button_1.button,
|
|
30
|
+
buttonGroup: button_group_1.buttonGroup,
|
|
31
|
+
buttonList: button_list_1.buttonList,
|
|
32
|
+
combobox: combobox_1.combobox,
|
|
33
|
+
datePickerInput: date_picker_input_1.datePickerInput,
|
|
34
|
+
datetimePickerInput: datetime_picker_input_1.datetimePickerInput,
|
|
35
|
+
dropzone: dropzone_1.dropzone,
|
|
36
|
+
flashMessage: flash_message_1.flashMessage,
|
|
37
|
+
checkboxButton: checkbox_button_1.checkboxButton,
|
|
38
|
+
checkboxInput: checkbox_input_1.checkboxInput,
|
|
39
|
+
iconButton: icon_button_1.iconButton,
|
|
40
|
+
input: input_1.input,
|
|
41
|
+
message: message_1.message,
|
|
42
|
+
modal: modal_1.modal,
|
|
43
|
+
multiCombobox: multi_combobox_1.multiCombobox,
|
|
44
|
+
multiSelect: multi_select_1.multiSelect,
|
|
45
|
+
radioGroup: radio_group_1.radioGroup,
|
|
46
|
+
select: select_1.select,
|
|
47
|
+
textarea: textarea_1.textarea,
|
|
48
|
+
textInput: text_input_1.textInput,
|
|
49
|
+
textLink: text_link_1.textLink,
|
|
50
|
+
toggle: toggle_1.toggle,
|
|
51
|
+
toolbarTab: toolbar_tab_1.toolbarTab,
|
|
52
|
+
cms: {
|
|
53
|
+
menu: menu_1.menu,
|
|
54
|
+
},
|
|
55
|
+
};
|
package/config.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BASE_URL: string;
|
package/config.js
ADDED
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./components"), exports);
|
|
18
|
+
__exportStar(require("./utils/wait-for-react"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
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)("Button")
|
|
8
|
+
.page(config_1.BASE_URL + "/examples/ui/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 Button", async () => {
|
|
14
|
+
await components_1.components.button({ text: "Default" }).click();
|
|
15
|
+
await components_1.components.button({ text: "Default" }).shouldExists();
|
|
16
|
+
await components_1.components.button({ text: "Not found" }).shouldNotExists();
|
|
17
|
+
await components_1.components.button({ text: "Disabled" }).shouldBeDisabled();
|
|
18
|
+
await components_1.components.button({ text: "Custom width" }).shouldNotBeDisabled();
|
|
19
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
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)("Checkbox button")
|
|
8
|
+
.page(config_1.BASE_URL + "/examples/ui/checkbox-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)("Checkbox button", async () => {
|
|
14
|
+
const defaultCheckboxButton = components_1.components.checkboxButton({ buttonText: "Opravdu?" });
|
|
15
|
+
await defaultCheckboxButton.shouldExist();
|
|
16
|
+
await defaultCheckboxButton.shouldBeChecked();
|
|
17
|
+
await defaultCheckboxButton.click();
|
|
18
|
+
await defaultCheckboxButton.shouldNotBeChecked();
|
|
19
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
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)("Checkbox input")
|
|
8
|
+
.page(config_1.BASE_URL + "/examples/ui/checkbox-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)("Checkbox input", async () => {
|
|
14
|
+
const defaultCheckboxInput = components_1.components.checkboxInput({ dataName: "checkbox-input" });
|
|
15
|
+
await defaultCheckboxInput.shouldExist();
|
|
16
|
+
await defaultCheckboxInput.shouldBeChecked();
|
|
17
|
+
await defaultCheckboxInput.click();
|
|
18
|
+
await defaultCheckboxInput.shouldNotBeChecked();
|
|
19
|
+
await components_1.components.checkboxInput({ dataName: "checkbox-input-disabled" }).shouldBeDisabled();
|
|
20
|
+
await components_1.components.checkboxInput({ dataName: "checkbox-input-disabled" }).click();
|
|
21
|
+
await components_1.components.checkboxInput({ dataName: "checkbox-input-disabled" }).shouldNotBeChecked();
|
|
22
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
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)("Combobox")
|
|
8
|
+
.page(config_1.BASE_URL + "/examples/form/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)("Combobox", async () => {
|
|
14
|
+
const defaultCombobox = components_1.components.combobox({ dataName: "firstname" });
|
|
15
|
+
await components_1.components.button({ text: "Submit" }).click();
|
|
16
|
+
await components_1.components.combobox({ dataName: "combobox-required" }).shouldBeInvalid(1000);
|
|
17
|
+
await components_1.components.combobox({ dataName: "combobox-required" }).shouldShowInvalidText("Toto pole je povinné");
|
|
18
|
+
await components_1.components.combobox({ dataName: "combobox-required" }).shouldBeRequired();
|
|
19
|
+
await defaultCombobox.shouldExist(1000);
|
|
20
|
+
await defaultCombobox.shouldBeEmpty(1000);
|
|
21
|
+
await defaultCombobox.selectItemWithTextFromDropdown("Option one", 1000);
|
|
22
|
+
await defaultCombobox.shouldHaveValue("Option one", 1000);
|
|
23
|
+
await components_1.components.combobox({ dataName: "combobox-required" }).replace("Option three");
|
|
24
|
+
await components_1.components.combobox({ dataName: "combobox-required" }).shouldHaveValue("Option three", 1000);
|
|
25
|
+
await components_1.components.combobox({ dataName: "combobox-disabled" }).shouldBeDisabled(1000);
|
|
26
|
+
await components_1.components.combobox({ dataName: "firstname" }).shouldNotBeDisabled(1000);
|
|
27
|
+
await (0, testcafe_1.ClientFunction)(() => {
|
|
28
|
+
document.location.reload();
|
|
29
|
+
})();
|
|
30
|
+
await defaultCombobox.typeTextAndSelectItemByIndex("Option t");
|
|
31
|
+
await defaultCombobox.shouldHaveValue("Option two");
|
|
32
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,231 @@
|
|
|
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
|
+
const gridRowsCount = () => {
|
|
8
|
+
return (0, testcafe_1.Selector)(".uxf-dg-table__body > .uxf-dg-table__row").count;
|
|
9
|
+
};
|
|
10
|
+
// Funkce pro kontrolu viditelnosti prvku ve viewportu
|
|
11
|
+
const isElementInViewport = (0, testcafe_1.ClientFunction)((selector) => {
|
|
12
|
+
const element = selector();
|
|
13
|
+
if (!element) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
const rect = element.getBoundingClientRect();
|
|
17
|
+
const windowHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
18
|
+
const windowWidth = window.innerWidth || document.documentElement.clientWidth;
|
|
19
|
+
// Podmínka pro ověření, že celý prvek je viditelný
|
|
20
|
+
return rect.top >= 0 && rect.left >= 0 && rect.bottom <= windowHeight && rect.right <= windowWidth;
|
|
21
|
+
});
|
|
22
|
+
(0, testcafe_1.fixture)("Datagrid V2")
|
|
23
|
+
.page(config_1.BASE_URL + "/examples/data-grid/data-grid-v2/Default")
|
|
24
|
+
.httpAuth({ username: "uxf", password: "uxf" })
|
|
25
|
+
.beforeEach(async (controller) => {
|
|
26
|
+
await (0, wait_for_react_1.waitForReact)(10000, controller);
|
|
27
|
+
});
|
|
28
|
+
(0, testcafe_1.test)("Check visibility of sticky action cell in viewport", async () => {
|
|
29
|
+
await testcafe_1.t.expect(gridRowsCount()).gte(1, { timeout: 5000 });
|
|
30
|
+
const actionCellColumn = (0, testcafe_1.Selector)(".uxf-dg-table__action-cell");
|
|
31
|
+
const isVisible = await isElementInViewport(actionCellColumn);
|
|
32
|
+
await testcafe_1.t.expect(isVisible).ok(`Action at index is not visible in the viewport`);
|
|
33
|
+
});
|
|
34
|
+
(0, testcafe_1.test)("Filter per tab - not shared filters", async () => {
|
|
35
|
+
//otevření filtrů
|
|
36
|
+
await components_1.components.iconButton({ iconName: "icon-sprite--filter" }).click();
|
|
37
|
+
//number inputy Number interval (od) a Number interval (do)
|
|
38
|
+
await components_1.components.input({ name: "interval.from" }).type("3");
|
|
39
|
+
await components_1.components.input({ name: "interval.from" }).shouldHaveValue("3");
|
|
40
|
+
await components_1.components.input({ name: "interval.to" }).type("5");
|
|
41
|
+
await components_1.components.input({ name: "interval.to" }).shouldHaveValue("5");
|
|
42
|
+
//email
|
|
43
|
+
await components_1.components.input({ name: "mail" }).type("test@uxf.cz");
|
|
44
|
+
await components_1.components.input({ name: "mail" }).shouldHaveValue("test@uxf.cz");
|
|
45
|
+
//datepicker Date (od) a Date (do)
|
|
46
|
+
await components_1.components.datePickerInput({ dataName: "date.from" }).selectDate(10, 10, 2030);
|
|
47
|
+
await components_1.components.datePickerInput({ dataName: "date.from" }).shouldHaveValue("10. 10. 2030");
|
|
48
|
+
await components_1.components.datePickerInput({ dataName: "date.to" }).selectDate(10, 10, 2032);
|
|
49
|
+
await components_1.components.datePickerInput({ dataName: "date.to" }).shouldHaveValue("10. 10. 2032");
|
|
50
|
+
//datetimepicker Datetime (od) a Datetime (do)
|
|
51
|
+
await components_1.components.datetimePickerInput({ dataName: "datetime.from" }).selectDatetime(10, 10, 2030, 10, 30);
|
|
52
|
+
await components_1.components.datetimePickerInput({ dataName: "datetime.from" }).shouldHaveValue("10. 10. 2030 10:30");
|
|
53
|
+
await components_1.components.datetimePickerInput({ dataName: "datetime.to" }).selectDatetime(10, 10, 2032, 12, 0);
|
|
54
|
+
await components_1.components.datetimePickerInput({ dataName: "datetime.to" }).shouldHaveValue("10. 10. 2032 12:00");
|
|
55
|
+
//select
|
|
56
|
+
await components_1.components.select({ dataName: "select" }).selectItemWithText("A");
|
|
57
|
+
await components_1.components.select({ dataName: "select" }).shouldHaveValue("A");
|
|
58
|
+
//multi select
|
|
59
|
+
await components_1.components.multiSelect({ dataName: "multiSelect" }).selectItemsByText(["Option 1", "Option 2"]);
|
|
60
|
+
//zavření filtru
|
|
61
|
+
await components_1.components.iconButton({ iconName: "icon-sprite--xmark" }).click();
|
|
62
|
+
//kontrola zobrazení chipů
|
|
63
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-chip").withText("Number interval: od 3 do 5").exists).ok();
|
|
64
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-chip").withText("E-mail: test@uxf.cz").exists).ok();
|
|
65
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-chip").withText("Date: od 10/10/2030 do 10/10/2032").exists).ok();
|
|
66
|
+
await testcafe_1.t
|
|
67
|
+
.expect((0, testcafe_1.Selector)(".uxf-chip").withText("Datetime: od 10/10/2030 10:30 AM do 10/10/2032 12:00 PM").exists)
|
|
68
|
+
.ok();
|
|
69
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-chip").withText("Select:\xa0A").exists).ok();
|
|
70
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-chip").withText("Multi select:\xa0Option 1, Option 2").exists).ok();
|
|
71
|
+
//přepnutí tabu
|
|
72
|
+
await components_1.components.toolbarTab({ text: "Only odd ids blablabla" }).click();
|
|
73
|
+
//kontrola že se filtry nepředávájí mezi taby
|
|
74
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-chip").withText("Number interval: od 3 do 5").exists).notOk();
|
|
75
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-chip").withText("E-mail: test@uxf.cz").exists).notOk();
|
|
76
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-chip").withText("Date: od 10/10/2030 do 10/10/2032").exists).notOk();
|
|
77
|
+
await testcafe_1.t
|
|
78
|
+
.expect((0, testcafe_1.Selector)(".uxf-chip").withText("Datetime: od 10/10/2030 10:30 AM do 10/10/2032 12:00 PM").exists)
|
|
79
|
+
.notOk();
|
|
80
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-chip").withText("Select:\xa0A").exists).notOk();
|
|
81
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-chip").withText("Multi select:\xa0Option 1, Option 2").exists).notOk();
|
|
82
|
+
//přepnutí tabu
|
|
83
|
+
await components_1.components.toolbarTab({ text: "All" }).click();
|
|
84
|
+
//otevření filtrů
|
|
85
|
+
await components_1.components.iconButton({ iconName: "icon-sprite--filter" }).click();
|
|
86
|
+
//smazání hodnot u number inputů
|
|
87
|
+
await components_1.components.input({ name: "interval.from" }).replace(" ");
|
|
88
|
+
await components_1.components.input({ name: "interval.to" }).replace(" ");
|
|
89
|
+
//samazání hotnoty text inputu email
|
|
90
|
+
const emailInput = (0, testcafe_1.Selector)(`input[name="mail"]`);
|
|
91
|
+
await testcafe_1.t.selectText(emailInput);
|
|
92
|
+
await testcafe_1.t.pressKey("delete");
|
|
93
|
+
//smazání datepicker Date (od) a Date (do)
|
|
94
|
+
await components_1.components.datePickerInput({ dataName: "date.from" }).clear();
|
|
95
|
+
await components_1.components.datePickerInput({ dataName: "date.to" }).clear();
|
|
96
|
+
//smazání datetimepicker Datetime (od) a Datetime (do)
|
|
97
|
+
await components_1.components.datetimePickerInput({ dataName: "datetime.from" }).clear();
|
|
98
|
+
await components_1.components.datetimePickerInput({ dataName: "datetime.to" }).clear();
|
|
99
|
+
//smazání hodnoty ze selectu
|
|
100
|
+
await components_1.components.select({ dataName: "select" }).clear();
|
|
101
|
+
//smazání honot z multi selectu
|
|
102
|
+
await components_1.components.multiSelect({ dataName: "multiSelect" }).removeItemsByText(["Option 1", "Option 2"]);
|
|
103
|
+
//zavření filtrů
|
|
104
|
+
await components_1.components.iconButton({ iconName: "icon-sprite--xmark" }).click();
|
|
105
|
+
//kontrola, že se nezobrazují chipy nad datagridem
|
|
106
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-data-grid__filter-list .uxf-chip").exists).notOk();
|
|
107
|
+
});
|
|
108
|
+
(0, testcafe_1.test)("Sharing filters and search between tabs", async () => {
|
|
109
|
+
await testcafe_1.t.click((0, testcafe_1.Selector)(".uxf-radio-group__option-label").withText("sharedFiltersAndSearch"));
|
|
110
|
+
//otevření filtrů
|
|
111
|
+
await components_1.components.iconButton({ iconName: "icon-sprite--filter" }).click();
|
|
112
|
+
//number inputy Number interval (od) a Number interval (do)
|
|
113
|
+
await components_1.components.input({ name: "interval.from" }).type("3");
|
|
114
|
+
await components_1.components.input({ name: "interval.from" }).shouldHaveValue("3");
|
|
115
|
+
await components_1.components.input({ name: "interval.to" }).type("5");
|
|
116
|
+
await components_1.components.input({ name: "interval.to" }).shouldHaveValue("5");
|
|
117
|
+
//zavření filtru
|
|
118
|
+
await components_1.components.iconButton({ iconName: "icon-sprite--xmark" }).click();
|
|
119
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-chip").withText("Number interval: od 3 do 5").exists).ok();
|
|
120
|
+
await components_1.components.textInput({ name: "fulltext" }).type("re");
|
|
121
|
+
await components_1.components.textInput({ name: "fulltext" }).shouldHaveValue("re");
|
|
122
|
+
await testcafe_1.t.expect(gridRowsCount()).eql(2, { timeout: 5000 });
|
|
123
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-dg-table__cell").withText("Red").exists).ok();
|
|
124
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-dg-table__cell").withText("Green").exists).ok();
|
|
125
|
+
await components_1.components.textInput({ name: "fulltext" }).replace("gray");
|
|
126
|
+
await components_1.components.textInput({ name: "fulltext" }).shouldHaveValue("gray");
|
|
127
|
+
await testcafe_1.t.expect(gridRowsCount()).eql(1, { timeout: 5000 });
|
|
128
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-dg-table__cell").withText("Gray").exists).ok();
|
|
129
|
+
//Přepnutí tabů
|
|
130
|
+
await components_1.components.toolbarTab({ text: "Only odd ids blablabla" }).click();
|
|
131
|
+
await components_1.components.toolbarTab({ text: "Only odd ids blablabla" }).shouldBeActive();
|
|
132
|
+
//přepuntí tabu zachová hodnotu text inputu pro fulltext
|
|
133
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-dg-table__cell").withText("Gray").exists).ok();
|
|
134
|
+
await testcafe_1.t.expect(gridRowsCount()).eql(1, { timeout: 5000 });
|
|
135
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-dg-table__cell").withText("Gray").exists).ok();
|
|
136
|
+
await components_1.components.textInput({ name: "fulltext" }).shouldHaveValue("gray");
|
|
137
|
+
});
|
|
138
|
+
(0, testcafe_1.test)("Sharing filters, search and sorts between tabs", async () => {
|
|
139
|
+
await testcafe_1.t.click((0, testcafe_1.Selector)(".uxf-radio-group__option-label").withText("sharedFiltersAndSearchAndSort"));
|
|
140
|
+
//sort Text column
|
|
141
|
+
await testcafe_1.t.click((0, testcafe_1.Selector)(".uxf-dg-table__cell--header").withText("Text"));
|
|
142
|
+
//otevření filtrů
|
|
143
|
+
await components_1.components.iconButton({ iconName: "icon-sprite--filter" }).click();
|
|
144
|
+
//number inputy Number interval (od) a Number interval (do)
|
|
145
|
+
await components_1.components.input({ name: "interval.from" }).type("3");
|
|
146
|
+
await components_1.components.input({ name: "interval.from" }).shouldHaveValue("3");
|
|
147
|
+
await components_1.components.input({ name: "interval.to" }).type("5");
|
|
148
|
+
await components_1.components.input({ name: "interval.to" }).shouldHaveValue("5");
|
|
149
|
+
//zavření filtru
|
|
150
|
+
await components_1.components.iconButton({ iconName: "icon-sprite--xmark" }).click();
|
|
151
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-chip").withText("Number interval: od 3 do 5").exists).ok();
|
|
152
|
+
await components_1.components.textInput({ name: "fulltext" }).type("w");
|
|
153
|
+
await components_1.components.textInput({ name: "fulltext" }).shouldHaveValue("w");
|
|
154
|
+
await testcafe_1.t.expect(gridRowsCount()).eql(2, { timeout: 5000 });
|
|
155
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-dg-table__cell").withText("White").exists).ok();
|
|
156
|
+
//Přepnutí tabů
|
|
157
|
+
await components_1.components.toolbarTab({ text: "Only odd ids blablabla" }).click();
|
|
158
|
+
await components_1.components.toolbarTab({ text: "Only odd ids blablabla" }).shouldBeActive();
|
|
159
|
+
//přepuntí tabu zachová řazení a hodnotu text inputu pro fulltext
|
|
160
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-dg-table__cell--type-string").nth(1).innerText).contains("White");
|
|
161
|
+
await testcafe_1.t.expect(gridRowsCount()).eql(2, { timeout: 5000 });
|
|
162
|
+
await components_1.components.textInput({ name: "fulltext" }).shouldHaveValue("w");
|
|
163
|
+
});
|
|
164
|
+
const columnsName = [
|
|
165
|
+
"Id",
|
|
166
|
+
"Text",
|
|
167
|
+
"Boolean",
|
|
168
|
+
"E-mail",
|
|
169
|
+
"Phone",
|
|
170
|
+
"Link",
|
|
171
|
+
"Date",
|
|
172
|
+
"Datetime",
|
|
173
|
+
"UUID",
|
|
174
|
+
"Chip",
|
|
175
|
+
"Chips",
|
|
176
|
+
"Money",
|
|
177
|
+
"ToOne",
|
|
178
|
+
"To many",
|
|
179
|
+
];
|
|
180
|
+
async function columnsExist() {
|
|
181
|
+
await columnsName.reduce((promise, column) => promise.then(() => testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-dg-table__cell").withText(column).exists).ok(`${column} was found`)), Promise.resolve());
|
|
182
|
+
}
|
|
183
|
+
async function columnsNotExist() {
|
|
184
|
+
await columnsName.reduce((promise, column) => promise.then(() => testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-dg-table__cell").withText(column).exists).notOk(`${column} was found`)), Promise.resolve());
|
|
185
|
+
}
|
|
186
|
+
(0, testcafe_1.test)("Columns hiding", async () => {
|
|
187
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-dg-table__cell").withExactText("Id").exists).notOk();
|
|
188
|
+
await components_1.components.iconButton({ iconName: "icon-sprite--table-columns" }).click();
|
|
189
|
+
await testcafe_1.t
|
|
190
|
+
.expect((0, testcafe_1.Selector)(".uxf-data-grid__drawer-content")
|
|
191
|
+
.find("div")
|
|
192
|
+
.withText("SKRYTÉ SLOUPCE")
|
|
193
|
+
.nextSibling()
|
|
194
|
+
.withText("Id").exists)
|
|
195
|
+
.ok();
|
|
196
|
+
await components_1.components.toggle({ text: "Id" }).click();
|
|
197
|
+
await components_1.components.iconButton({ iconName: "icon-sprite--xmark" }).click();
|
|
198
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-dg-table__cell").withExactText("Id").exists).ok();
|
|
199
|
+
await columnsExist();
|
|
200
|
+
await components_1.components.iconButton({ iconName: "icon-sprite--table-columns" }).click();
|
|
201
|
+
await components_1.components.textLink({ text: "zobrazit vše" }).shouldNotExists();
|
|
202
|
+
await components_1.components.textLink({ text: "skrýt vše" }).click();
|
|
203
|
+
await testcafe_1.t
|
|
204
|
+
.expect((0, testcafe_1.Selector)(".uxf-data-grid__hidden-columns-title").nextSibling().innerText)
|
|
205
|
+
.contains("Tabulka má všechny sloupce skryté. Pro zobrazení vyberte sloupec níže.");
|
|
206
|
+
await components_1.components.iconButton({ iconName: "icon-sprite--xmark" }).click();
|
|
207
|
+
await columnsNotExist();
|
|
208
|
+
});
|
|
209
|
+
(0, testcafe_1.test)("Pagination", async () => {
|
|
210
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)("div").withText("Načítám...").exists).notOk({ timeout: 10000 });
|
|
211
|
+
await testcafe_1.t.click((0, testcafe_1.Selector)(".uxf-pagination__button.is-next"));
|
|
212
|
+
await testcafe_1.t.expect(gridRowsCount()).eql(1, { timeout: 5000 });
|
|
213
|
+
await testcafe_1.t.click((0, testcafe_1.Selector)(".uxf-data-grid__rows-per-page .uxf-form-component__input"));
|
|
214
|
+
await testcafe_1.t.click((0, testcafe_1.Selector)(".uxf-select__dropdown-item").withText("25"));
|
|
215
|
+
await testcafe_1.t.expect(gridRowsCount()).eql(11, { timeout: 5000 });
|
|
216
|
+
});
|
|
217
|
+
(0, testcafe_1.test)("No rows fallback", async () => {
|
|
218
|
+
await components_1.components.textInput({ name: "fulltext" }).type(" ");
|
|
219
|
+
await components_1.components.textInput({ name: "fulltext" }).shouldHaveValue(" ");
|
|
220
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)(".uxf-dg-table__no-rows-fallback").withText("Žádné záznamy").exists).ok({ timeout: 5000 });
|
|
221
|
+
});
|
|
222
|
+
(0, testcafe_1.test)("Bulk action", async () => {
|
|
223
|
+
await testcafe_1.t.expect((0, testcafe_1.Selector)("div").withText("Načítám...").exists).notOk({ timeout: 10000 });
|
|
224
|
+
await components_1.components.checkboxInput({ dataName: "select-all-rows" }).click();
|
|
225
|
+
await components_1.components.checkboxInput({ dataName: "select-all-rows" }).shouldBeChecked();
|
|
226
|
+
const selectedRowsToolbar = (0, testcafe_1.Selector)(".uxf-data-grid__selected-rows-toolbar").withText("Vybráno 10 záznamů");
|
|
227
|
+
await testcafe_1.t.expect(selectedRowsToolbar.exists).ok({ timeout: 5000 });
|
|
228
|
+
await components_1.components.button({ text: "Zrušit výběr" }).click();
|
|
229
|
+
await testcafe_1.t.expect(selectedRowsToolbar.exists).notOk({ timeout: 5000 });
|
|
230
|
+
await components_1.components.checkboxInput({ dataName: "select-all-rows" }).shouldNotBeChecked();
|
|
231
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
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)("Date picker input")
|
|
8
|
+
.page(config_1.BASE_URL + "/examples/ui/date-picker-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)("Date picker input", async () => {
|
|
14
|
+
const defaultDatePickerInput = components_1.components.datePickerInput({ dataName: "date" });
|
|
15
|
+
await defaultDatePickerInput.shouldBeEmpty();
|
|
16
|
+
await defaultDatePickerInput.shouldNotBeDisabled();
|
|
17
|
+
await defaultDatePickerInput.selectDate(1, 1, 2024);
|
|
18
|
+
await defaultDatePickerInput.shouldHaveValue("1. 1. 2024");
|
|
19
|
+
await defaultDatePickerInput.replace(5, 12, 2025);
|
|
20
|
+
await defaultDatePickerInput.shouldHaveValue("5. 12. 2025");
|
|
21
|
+
//do disabled se nedá psát
|
|
22
|
+
await components_1.components.datePickerInput({ dataName: "date-disabled" }).shouldBeDisabled();
|
|
23
|
+
await components_1.components.datePickerInput({ dataName: "date-disabled" }).selectDate(8, 1, 2024);
|
|
24
|
+
await components_1.components.datePickerInput({ dataName: "date-disabled" }).shouldHaveValue("5. 12. 2025");
|
|
25
|
+
await components_1.components.datePickerInput({ dataName: "date-invalid" }).shouldBeInvalid();
|
|
26
|
+
await defaultDatePickerInput.clear();
|
|
27
|
+
await defaultDatePickerInput.shouldBeEmpty();
|
|
28
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
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)("Datetime picker input")
|
|
8
|
+
.page(config_1.BASE_URL + "/examples/ui/datetime-picker-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)("Datetime picker input", async () => {
|
|
14
|
+
const defaultDatetimePickerInput = components_1.components.datetimePickerInput({ dataName: "date" });
|
|
15
|
+
await defaultDatetimePickerInput.shouldNotBeDisabled();
|
|
16
|
+
await defaultDatetimePickerInput.selectDatetime(1, 1, 2024, 12, 45);
|
|
17
|
+
await defaultDatetimePickerInput.shouldHaveValue("1. 1. 2024 12:45");
|
|
18
|
+
await defaultDatetimePickerInput.replace(5, 12, 2025, 13, 5);
|
|
19
|
+
await defaultDatetimePickerInput.shouldHaveValue("5. 12. 2025 13:05");
|
|
20
|
+
//do disabled se nedá psát
|
|
21
|
+
await components_1.components.datetimePickerInput({ dataName: "date-disabled" }).shouldBeDisabled();
|
|
22
|
+
await components_1.components.datetimePickerInput({ dataName: "date-disabled" }).replace(8, 1, 2024, 14, 5);
|
|
23
|
+
await components_1.components.datetimePickerInput({ dataName: "date-disabled" }).shouldHaveValue("5. 12. 2025 13:05");
|
|
24
|
+
await components_1.components.datetimePickerInput({ dataName: "date-invalid" }).shouldBeInvalid();
|
|
25
|
+
await defaultDatetimePickerInput.clear();
|
|
26
|
+
await defaultDatetimePickerInput.shouldBeEmpty();
|
|
27
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|