@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.
- package/package.json +1 -1
- package/cms/menu.d.ts +0 -8
- package/cms/menu.js +0 -33
- package/components.d.ts +0 -52
- package/components.js +0 -55
- package/config.d.ts +0 -1
- package/config.js +0 -5
- package/index.d.ts +0 -2
- package/index.js +0 -18
- package/tests/button.e2e.d.ts +0 -1
- package/tests/button.e2e.js +0 -19
- package/tests/checkbox-button.e2e.d.ts +0 -1
- package/tests/checkbox-button.e2e.js +0 -19
- package/tests/checkbox-input.e2e.d.ts +0 -1
- package/tests/checkbox-input.e2e.js +0 -22
- package/tests/combobox.e2e.d.ts +0 -1
- package/tests/combobox.e2e.js +0 -32
- package/tests/datagrid-v2.e2e.d.ts +0 -1
- package/tests/datagrid-v2.e2e.js +0 -231
- package/tests/date-picker-input.e2e.d.ts +0 -1
- package/tests/date-picker-input.e2e.js +0 -28
- package/tests/date-time-picker-input.e2e.d.ts +0 -1
- package/tests/date-time-picker-input.e2e.js +0 -27
- package/tests/dropzone.e2e.d.ts +0 -1
- package/tests/dropzone.e2e.js +0 -96
- package/tests/flash-message.e2e.d.ts +0 -1
- package/tests/flash-message.e2e.js +0 -19
- package/tests/icon-button.e2e.d.ts +0 -1
- package/tests/icon-button.e2e.js +0 -20
- package/tests/message.e2e.d.ts +0 -1
- package/tests/message.e2e.js +0 -25
- package/tests/modal.e2e.d.ts +0 -1
- package/tests/modal.e2e.js +0 -23
- package/tests/multi-combobox.e2e.d.ts +0 -1
- package/tests/multi-combobox.e2e.js +0 -25
- package/tests/multi-select.e2e.d.ts +0 -1
- package/tests/multi-select.e2e.js +0 -32
- package/tests/radio-group.e2e.d.ts +0 -1
- package/tests/radio-group.e2e.js +0 -17
- package/tests/select.e2e.d.ts +0 -1
- package/tests/select.e2e.js +0 -26
- package/tests/sidebar-menu.e2e.d.ts +0 -1
- package/tests/sidebar-menu.e2e.js +0 -41
- package/tests/text-input.e2e.d.ts +0 -1
- package/tests/text-input.e2e.js +0 -25
- package/tests/text-link.e2e.d.ts +0 -1
- package/tests/text-link.e2e.js +0 -17
- package/tests/textarea.e2e.d.ts +0 -1
- package/tests/textarea.e2e.js +0 -22
- package/tests/toggle.e2e.d.ts +0 -1
- package/tests/toggle.e2e.js +0 -21
- package/tests/toolbar-tab.e2e.d.ts +0 -1
- package/tests/toolbar-tab.e2e.js +0 -20
- package/ui/button-group.d.ts +0 -10
- package/ui/button-group.js +0 -20
- package/ui/button-list.d.ts +0 -8
- package/ui/button-list.js +0 -16
- package/ui/button.d.ts +0 -13
- package/ui/button.js +0 -33
- package/ui/checkbox-button.d.ts +0 -11
- package/ui/checkbox-button.js +0 -22
- package/ui/checkbox-input.d.ts +0 -12
- package/ui/checkbox-input.js +0 -28
- package/ui/combobox.d.ts +0 -19
- package/ui/combobox.js +0 -58
- package/ui/date-picker-input.d.ts +0 -16
- package/ui/date-picker-input.js +0 -40
- package/ui/datetime-picker-input.d.ts +0 -16
- package/ui/datetime-picker-input.js +0 -38
- package/ui/dropzone.d.ts +0 -25
- package/ui/dropzone.js +0 -70
- package/ui/flash-message.d.ts +0 -8
- package/ui/flash-message.js +0 -19
- package/ui/icon-button.d.ts +0 -13
- package/ui/icon-button.js +0 -39
- package/ui/input.d.ts +0 -14
- package/ui/input.js +0 -31
- package/ui/message.d.ts +0 -5
- package/ui/message.js +0 -16
- package/ui/modal.d.ts +0 -5
- package/ui/modal.js +0 -16
- package/ui/multi-combobox.d.ts +0 -15
- package/ui/multi-combobox.js +0 -50
- package/ui/multi-select.d.ts +0 -17
- package/ui/multi-select.js +0 -50
- package/ui/radio-group.d.ts +0 -10
- package/ui/radio-group.js +0 -29
- package/ui/select.d.ts +0 -17
- package/ui/select.js +0 -45
- package/ui/text-input.d.ts +0 -14
- package/ui/text-input.js +0 -29
- package/ui/text-link.d.ts +0 -11
- package/ui/text-link.js +0 -23
- package/ui/textarea.d.ts +0 -14
- package/ui/textarea.js +0 -32
- package/ui/toggle.d.ts +0 -15
- package/ui/toggle.js +0 -46
- package/ui/toolbar-tab.d.ts +0 -13
- package/ui/toolbar-tab.js +0 -37
- package/utils/base-finder.d.ts +0 -3
- package/utils/base-finder.js +0 -2
- package/utils/create-selector.d.ts +0 -2
- package/utils/create-selector.js +0 -8
- package/utils/root-selector.d.ts +0 -1
- package/utils/root-selector.js +0 -5
- package/utils/wait-for-react.d.ts +0 -1
- package/utils/wait-for-react.js +0 -52
package/ui/checkbox-button.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkboxButton = checkboxButton;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function checkboxButton(finder) {
|
|
7
|
-
const checkboxButtonSelector = (0, create_selector_1.createSelector)(finder).find(".uxf-checkbox-button").withExactText(finder.buttonText);
|
|
8
|
-
return {
|
|
9
|
-
click() {
|
|
10
|
-
return testcafe_1.t.click(checkboxButtonSelector);
|
|
11
|
-
},
|
|
12
|
-
shouldBeChecked() {
|
|
13
|
-
return testcafe_1.t.expect(checkboxButtonSelector.hasClass("is-selected")).ok();
|
|
14
|
-
},
|
|
15
|
-
shouldNotBeChecked() {
|
|
16
|
-
return testcafe_1.t.expect(checkboxButtonSelector.hasClass("is-selected")).notOk();
|
|
17
|
-
},
|
|
18
|
-
shouldExist() {
|
|
19
|
-
return testcafe_1.t.expect(checkboxButtonSelector.exists).ok();
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
}
|
package/ui/checkbox-input.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface CheckboxInputFinder extends BaseFinder {
|
|
3
|
-
dataName: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function checkboxInput(finder: CheckboxInputFinder): {
|
|
6
|
-
click(): TestControllerPromise<any>;
|
|
7
|
-
shouldBeChecked(): TestControllerPromise<any>;
|
|
8
|
-
shouldNotBeChecked(): TestControllerPromise<any>;
|
|
9
|
-
shouldExist(): TestControllerPromise<any>;
|
|
10
|
-
shouldBeDisabled(): TestControllerPromise<any>;
|
|
11
|
-
};
|
|
12
|
-
export {};
|
package/ui/checkbox-input.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkboxInput = checkboxInput;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function checkboxInput(finder) {
|
|
7
|
-
//TODO jakmile bude name na správné úrovni, tak udělat s name
|
|
8
|
-
const checkboxInputSelector = (0, create_selector_1.createSelector)(finder)
|
|
9
|
-
.find(".uxf-checkbox-input__wrapper")
|
|
10
|
-
.withAttribute("data-name", finder.dataName);
|
|
11
|
-
return {
|
|
12
|
-
click() {
|
|
13
|
-
return testcafe_1.t.click(checkboxInputSelector);
|
|
14
|
-
},
|
|
15
|
-
shouldBeChecked() {
|
|
16
|
-
return testcafe_1.t.expect(checkboxInputSelector.find(".uxf-checkbox-input").hasClass("is-selected")).ok();
|
|
17
|
-
},
|
|
18
|
-
shouldNotBeChecked() {
|
|
19
|
-
return testcafe_1.t.expect(checkboxInputSelector.find(".uxf-checkbox-input").hasClass("is-selected")).notOk();
|
|
20
|
-
},
|
|
21
|
-
shouldExist() {
|
|
22
|
-
return testcafe_1.t.expect(checkboxInputSelector.exists).ok();
|
|
23
|
-
},
|
|
24
|
-
shouldBeDisabled() {
|
|
25
|
-
return testcafe_1.t.expect(checkboxInputSelector.find(".uxf-checkbox-input").hasClass("is-disabled")).ok();
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
}
|
package/ui/combobox.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface ComboboxFinder extends BaseFinder {
|
|
3
|
-
dataName: string;
|
|
4
|
-
nth?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function combobox(finder: ComboboxFinder): {
|
|
7
|
-
typeTextAndSelectItemByIndex(optionText: string, index?: number, timeout?: number): TestControllerPromise<any>;
|
|
8
|
-
selectItemWithTextFromDropdown(optionText: string, timeout?: number): TestControllerPromise<any>;
|
|
9
|
-
shouldExist(timeout?: number): TestControllerPromise<any>;
|
|
10
|
-
shouldHaveValue(value: string, timeout?: number): TestControllerPromise<any>;
|
|
11
|
-
shouldBeEmpty(timeout?: number): TestControllerPromise<any>;
|
|
12
|
-
replace(optionText: string, index?: number): TestControllerPromise<any>;
|
|
13
|
-
shouldBeDisabled(timeout?: number): TestControllerPromise<any>;
|
|
14
|
-
shouldNotBeDisabled(timeout?: number): TestControllerPromise<any>;
|
|
15
|
-
shouldBeInvalid(timeout?: number): TestControllerPromise<any>;
|
|
16
|
-
shouldShowInvalidText(errorText: string): TestControllerPromise<any>;
|
|
17
|
-
shouldBeRequired(): TestControllerPromise<any>;
|
|
18
|
-
};
|
|
19
|
-
export {};
|
package/ui/combobox.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.combobox = combobox;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function combobox(finder) {
|
|
7
|
-
var _a;
|
|
8
|
-
const comboboxSelector = (0, create_selector_1.createSelector)(finder)
|
|
9
|
-
.find(".uxf-combobox")
|
|
10
|
-
.withAttribute("data-name", finder.dataName)
|
|
11
|
-
.nth((_a = finder.nth) !== null && _a !== void 0 ? _a : 0)
|
|
12
|
-
.find(".uxf-form-component__input");
|
|
13
|
-
return {
|
|
14
|
-
typeTextAndSelectItemByIndex(optionText, index = 0, timeout = 0) {
|
|
15
|
-
return testcafe_1.t
|
|
16
|
-
.typeText(comboboxSelector, optionText)
|
|
17
|
-
.expect((0, testcafe_1.Selector)("li.uxf-dropdown__item").nth(index).exists)
|
|
18
|
-
.ok({ timeout })
|
|
19
|
-
.click((0, testcafe_1.Selector)("li.uxf-dropdown__item").nth(index));
|
|
20
|
-
},
|
|
21
|
-
selectItemWithTextFromDropdown(optionText, timeout = 0) {
|
|
22
|
-
return testcafe_1.t
|
|
23
|
-
.click(comboboxSelector.find(".uxf-input__arrow-icon"))
|
|
24
|
-
.expect((0, testcafe_1.Selector)(".uxf-dropdown__item").withText(optionText).exists)
|
|
25
|
-
.ok({ timeout })
|
|
26
|
-
.click((0, testcafe_1.Selector)(".uxf-dropdown__item").withText(optionText));
|
|
27
|
-
},
|
|
28
|
-
shouldExist(timeout = 0) {
|
|
29
|
-
return testcafe_1.t.expect(comboboxSelector.exists).ok({ timeout });
|
|
30
|
-
},
|
|
31
|
-
shouldHaveValue(value, timeout = 0) {
|
|
32
|
-
return testcafe_1.t.expect(comboboxSelector.find("input").value).eql(value, { timeout });
|
|
33
|
-
},
|
|
34
|
-
shouldBeEmpty(timeout = 0) {
|
|
35
|
-
return testcafe_1.t.expect(comboboxSelector.find("input").value).eql("", { timeout });
|
|
36
|
-
},
|
|
37
|
-
replace(optionText, index = 0) {
|
|
38
|
-
return testcafe_1.t
|
|
39
|
-
.typeText(comboboxSelector, optionText, { replace: true })
|
|
40
|
-
.click((0, testcafe_1.Selector)("li.uxf-dropdown__item").nth(index));
|
|
41
|
-
},
|
|
42
|
-
shouldBeDisabled(timeout = 0) {
|
|
43
|
-
return testcafe_1.t.expect(comboboxSelector.find("div").hasClass("is-disabled")).ok({ timeout });
|
|
44
|
-
},
|
|
45
|
-
shouldNotBeDisabled(timeout = 0) {
|
|
46
|
-
return testcafe_1.t.expect(comboboxSelector.find("div").hasClass("is-disabled")).notOk({ timeout });
|
|
47
|
-
},
|
|
48
|
-
shouldBeInvalid(timeout = 0) {
|
|
49
|
-
return testcafe_1.t.expect(comboboxSelector.parent().hasClass("is-invalid")).ok({ timeout });
|
|
50
|
-
},
|
|
51
|
-
shouldShowInvalidText(errorText) {
|
|
52
|
-
return testcafe_1.t.expect(comboboxSelector.innerText).contains(errorText);
|
|
53
|
-
},
|
|
54
|
-
shouldBeRequired() {
|
|
55
|
-
return testcafe_1.t.expect(comboboxSelector.parent().hasClass("is-required")).ok();
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface DatePickerInputFinder extends BaseFinder {
|
|
3
|
-
dataName: string;
|
|
4
|
-
nth?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function datePickerInput(finder: DatePickerInputFinder): {
|
|
7
|
-
selectDate(DD: number, MM: number, YYYY: number): TestControllerPromise<any>;
|
|
8
|
-
replace(DD: number, MM: number, YYYY: number): TestControllerPromise<any>;
|
|
9
|
-
shouldHaveValue(value: string): TestControllerPromise<any>;
|
|
10
|
-
shouldBeDisabled(): TestControllerPromise<any>;
|
|
11
|
-
shouldNotBeDisabled(): TestControllerPromise<any>;
|
|
12
|
-
shouldBeInvalid(): TestControllerPromise<any>;
|
|
13
|
-
clear(): TestControllerPromise<any>;
|
|
14
|
-
shouldBeEmpty(): TestControllerPromise<any>;
|
|
15
|
-
};
|
|
16
|
-
export {};
|
package/ui/date-picker-input.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.datePickerInput = datePickerInput;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function datePickerInput(finder) {
|
|
7
|
-
var _a;
|
|
8
|
-
const datepickerInputSelector = (0, create_selector_1.createSelector)(finder)
|
|
9
|
-
.find(".uxf-date-picker-input")
|
|
10
|
-
.withAttribute("data-name", finder.dataName)
|
|
11
|
-
.nth((_a = finder.nth) !== null && _a !== void 0 ? _a : 0);
|
|
12
|
-
return {
|
|
13
|
-
selectDate(DD, MM, YYYY) {
|
|
14
|
-
return testcafe_1.t.typeText(datepickerInputSelector.find(".uxf-input__element"), `${DD}.${MM}.${YYYY}`);
|
|
15
|
-
},
|
|
16
|
-
replace(DD, MM, YYYY) {
|
|
17
|
-
return testcafe_1.t.typeText(datepickerInputSelector.find(".uxf-input__element"), `${DD}.${MM}.${YYYY}`, {
|
|
18
|
-
replace: true,
|
|
19
|
-
});
|
|
20
|
-
},
|
|
21
|
-
shouldHaveValue(value) {
|
|
22
|
-
return testcafe_1.t.expect(datepickerInputSelector.find(".uxf-input__element").value).eql(value);
|
|
23
|
-
},
|
|
24
|
-
shouldBeDisabled() {
|
|
25
|
-
return testcafe_1.t.expect(datepickerInputSelector.hasClass("is-disabled")).ok();
|
|
26
|
-
},
|
|
27
|
-
shouldNotBeDisabled() {
|
|
28
|
-
return testcafe_1.t.expect(datepickerInputSelector.hasClass("is-disabled")).notOk();
|
|
29
|
-
},
|
|
30
|
-
shouldBeInvalid() {
|
|
31
|
-
return testcafe_1.t.expect(datepickerInputSelector.hasClass("is-invalid")).ok();
|
|
32
|
-
},
|
|
33
|
-
clear() {
|
|
34
|
-
return testcafe_1.t.click(datepickerInputSelector.find(".uxf-input__remove-button-inner"));
|
|
35
|
-
},
|
|
36
|
-
shouldBeEmpty() {
|
|
37
|
-
return testcafe_1.t.expect(datepickerInputSelector.find("input.uxf-input__element").value).eql("");
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface DatetimePickerInputFinder extends BaseFinder {
|
|
3
|
-
dataName: string;
|
|
4
|
-
nth?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function datetimePickerInput(finder: DatetimePickerInputFinder): {
|
|
7
|
-
selectDatetime(DD: number, MM: number, YYYY: number, hr: number, min: number): TestControllerPromise<any>;
|
|
8
|
-
replace(DD: number, MM: number, YYYY: number, hr: number, min: number): TestControllerPromise<any>;
|
|
9
|
-
shouldHaveValue(value: string): TestControllerPromise<any>;
|
|
10
|
-
shouldBeDisabled(): TestControllerPromise<any>;
|
|
11
|
-
shouldNotBeDisabled(): TestControllerPromise<any>;
|
|
12
|
-
shouldBeInvalid(): TestControllerPromise<any>;
|
|
13
|
-
clear(): TestControllerPromise<any>;
|
|
14
|
-
shouldBeEmpty(): TestControllerPromise<any>;
|
|
15
|
-
};
|
|
16
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.datetimePickerInput = datetimePickerInput;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function datetimePickerInput(finder) {
|
|
7
|
-
var _a;
|
|
8
|
-
const datetimepickerInputSelector = (0, create_selector_1.createSelector)(finder)
|
|
9
|
-
.find(".uxf-date-time-picker-input")
|
|
10
|
-
.withAttribute("data-name", finder.dataName)
|
|
11
|
-
.nth((_a = finder.nth) !== null && _a !== void 0 ? _a : 0);
|
|
12
|
-
return {
|
|
13
|
-
selectDatetime(DD, MM, YYYY, hr, min) {
|
|
14
|
-
return testcafe_1.t.typeText(datetimepickerInputSelector.find(".uxf-input__element"), `${DD}.${MM}.${YYYY} ${hr}:${min.toString().padStart(2, "0")}`);
|
|
15
|
-
},
|
|
16
|
-
replace(DD, MM, YYYY, hr, min) {
|
|
17
|
-
return testcafe_1.t.typeText(datetimepickerInputSelector.find(".uxf-input__element"), `${DD}.${MM}.${YYYY} ${hr}:${min.toString().padStart(2, "0")}`, { replace: true });
|
|
18
|
-
},
|
|
19
|
-
shouldHaveValue(value) {
|
|
20
|
-
return testcafe_1.t.expect(datetimepickerInputSelector.find(".uxf-input__element").value).eql(value);
|
|
21
|
-
},
|
|
22
|
-
shouldBeDisabled() {
|
|
23
|
-
return testcafe_1.t.expect(datetimepickerInputSelector.hasClass("is-disabled")).ok();
|
|
24
|
-
},
|
|
25
|
-
shouldNotBeDisabled() {
|
|
26
|
-
return testcafe_1.t.expect(datetimepickerInputSelector.hasClass("is-disabled")).notOk();
|
|
27
|
-
},
|
|
28
|
-
shouldBeInvalid() {
|
|
29
|
-
return testcafe_1.t.expect(datetimepickerInputSelector.hasAttribute("disabled")).notOk();
|
|
30
|
-
},
|
|
31
|
-
clear() {
|
|
32
|
-
return testcafe_1.t.click(datetimepickerInputSelector.find(".uxf-input__remove-button-inner"));
|
|
33
|
-
},
|
|
34
|
-
shouldBeEmpty() {
|
|
35
|
-
return testcafe_1.t.expect(datetimepickerInputSelector.find("input.uxf-input__element").value).eql("");
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
}
|
package/ui/dropzone.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface DropzoneFinder extends BaseFinder {
|
|
3
|
-
name: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function dropzone(finder: DropzoneFinder): {
|
|
6
|
-
/**
|
|
7
|
-
* V projektu vytvořit složku \_uploads_ v root složce a do ní nahrát soubory.
|
|
8
|
-
* Ze složky _uploads_ se vybírají soubory, které jsou zadány jako filesToUpload.
|
|
9
|
-
*
|
|
10
|
-
* @param filesToUpload cesta k souboru musí začínat ./[název souboru]
|
|
11
|
-
*
|
|
12
|
-
* @param timeout
|
|
13
|
-
* @example
|
|
14
|
-
* await defaultDropzone.uploadFiles(["./Jpg-test.jpg"]);
|
|
15
|
-
*/
|
|
16
|
-
uploadFiles(filesToUpload: Array<string>, timeout?: number): TestControllerPromise<any>;
|
|
17
|
-
uploadedFilesShouldExist(uploadedFiles: Array<string>): Promise<void>;
|
|
18
|
-
uploadedFilesShouldNotExist(uploadedFiles: Array<string>): Promise<void>;
|
|
19
|
-
removeUploadedFile(fileName: string): Promise<void>;
|
|
20
|
-
shouldExists(): TestControllerPromise<any>;
|
|
21
|
-
shouldNotExists(): TestControllerPromise<any>;
|
|
22
|
-
shouldBeDisabled(): TestControllerPromise<any>;
|
|
23
|
-
shouldNotBeDisabled(): TestControllerPromise<any>;
|
|
24
|
-
};
|
|
25
|
-
export {};
|
package/ui/dropzone.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dropzone = dropzone;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function dropzone(finder) {
|
|
7
|
-
const dropzoneSelector = (0, create_selector_1.createSelector)(finder)
|
|
8
|
-
.find(".uxf-dropzone__input")
|
|
9
|
-
.withAttribute("name", finder.name)
|
|
10
|
-
.with({ visibilityCheck: false });
|
|
11
|
-
return {
|
|
12
|
-
/**
|
|
13
|
-
* V projektu vytvořit složku \_uploads_ v root složce a do ní nahrát soubory.
|
|
14
|
-
* Ze složky _uploads_ se vybírají soubory, které jsou zadány jako filesToUpload.
|
|
15
|
-
*
|
|
16
|
-
* @param filesToUpload cesta k souboru musí začínat ./[název souboru]
|
|
17
|
-
*
|
|
18
|
-
* @param timeout
|
|
19
|
-
* @example
|
|
20
|
-
* await defaultDropzone.uploadFiles(["./Jpg-test.jpg"]);
|
|
21
|
-
*/
|
|
22
|
-
uploadFiles(filesToUpload, timeout = 10000) {
|
|
23
|
-
return testcafe_1.t
|
|
24
|
-
.setFilesToUpload(dropzoneSelector, filesToUpload)
|
|
25
|
-
.expect(dropzoneSelector.parent(".uxf-dropzone").nextSibling(".uxf-dropzone-list").find(".uxf-loader")
|
|
26
|
-
.exists)
|
|
27
|
-
.notOk(`The loader ('.uxf-loader') is still visible after ${timeout}ms.`, { timeout });
|
|
28
|
-
},
|
|
29
|
-
async uploadedFilesShouldExist(uploadedFiles) {
|
|
30
|
-
await uploadedFiles.reduce((promise, file) => promise.then(() => testcafe_1.t
|
|
31
|
-
.expect((0, testcafe_1.Selector)(".uxf-dropzone-list").find("li").withText(file).exists)
|
|
32
|
-
.ok(`File "${file}" does not exists but it should exists in dropzone ${finder.name}`, {
|
|
33
|
-
timeout: 5000,
|
|
34
|
-
})), Promise.resolve());
|
|
35
|
-
},
|
|
36
|
-
async uploadedFilesShouldNotExist(uploadedFiles) {
|
|
37
|
-
await uploadedFiles.reduce((promise, file) => promise.then(() => testcafe_1.t
|
|
38
|
-
.expect((0, testcafe_1.Selector)(".uxf-dropzone-list").find("li").withText(file).exists)
|
|
39
|
-
.notOk(`File "${file}" exists but it should not exists in dropzone ${finder.name}`)), Promise.resolve());
|
|
40
|
-
},
|
|
41
|
-
async removeUploadedFile(fileName) {
|
|
42
|
-
await testcafe_1.t.click(dropzoneSelector
|
|
43
|
-
.parent(".uxf-dropzone")
|
|
44
|
-
.nextSibling(".uxf-dropzone-list")
|
|
45
|
-
.find(".uxf-dropzone-list__item")
|
|
46
|
-
.withText(fileName)
|
|
47
|
-
.find(".uxf-dropzone-list__item__block__remove-button__icon"));
|
|
48
|
-
},
|
|
49
|
-
shouldExists() {
|
|
50
|
-
return testcafe_1.t
|
|
51
|
-
.expect(dropzoneSelector.exists)
|
|
52
|
-
.ok(`Dropzone with name ${finder.name} not exists or was not found should exists`);
|
|
53
|
-
},
|
|
54
|
-
shouldNotExists() {
|
|
55
|
-
return testcafe_1.t
|
|
56
|
-
.expect(dropzoneSelector.exists)
|
|
57
|
-
.notOk(`Dropzone with name ${finder.name} exists but it should not exists`);
|
|
58
|
-
},
|
|
59
|
-
shouldBeDisabled() {
|
|
60
|
-
return testcafe_1.t
|
|
61
|
-
.expect(dropzoneSelector.parent().hasClass("is-disabled"))
|
|
62
|
-
.ok(`Dropzone with name ${finder.name} should be disabled but it is not disabled`);
|
|
63
|
-
},
|
|
64
|
-
shouldNotBeDisabled() {
|
|
65
|
-
return testcafe_1.t
|
|
66
|
-
.expect(dropzoneSelector.parent().hasClass("is-disabled"))
|
|
67
|
-
.notOk(`Dropzone with name ${finder.name} should not be disabled but it is disabled`);
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
}
|
package/ui/flash-message.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
type FlashMessageFinder = BaseFinder;
|
|
3
|
-
export declare function flashMessage(finder?: FlashMessageFinder): {
|
|
4
|
-
shouldExists(timeout?: number): TestControllerPromise<any>;
|
|
5
|
-
shouldNotExists(timeout?: number): TestControllerPromise<any>;
|
|
6
|
-
shouldContainsText(text: string, timeout?: number): TestControllerPromise<any>;
|
|
7
|
-
};
|
|
8
|
-
export {};
|
package/ui/flash-message.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.flashMessage = flashMessage;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function flashMessage(finder) {
|
|
7
|
-
const FlashMessageSelector = (0, create_selector_1.createSelector)(finder !== null && finder !== void 0 ? finder : {}).find(".uxf-flash-messages");
|
|
8
|
-
return {
|
|
9
|
-
shouldExists(timeout = 0) {
|
|
10
|
-
return testcafe_1.t.expect(FlashMessageSelector.exists).ok({ timeout });
|
|
11
|
-
},
|
|
12
|
-
shouldNotExists(timeout = 0) {
|
|
13
|
-
return testcafe_1.t.expect(FlashMessageSelector.exists).notOk({ timeout });
|
|
14
|
-
},
|
|
15
|
-
shouldContainsText(text, timeout = 0) {
|
|
16
|
-
return testcafe_1.t.expect(FlashMessageSelector.innerText).contains(text, { timeout });
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
}
|
package/ui/icon-button.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface IconFinder extends BaseFinder {
|
|
3
|
-
iconName: string;
|
|
4
|
-
nth?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function iconButton(finder: IconFinder): {
|
|
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/icon-button.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.iconButton = iconButton;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function iconButton(finder) {
|
|
7
|
-
var _a;
|
|
8
|
-
const iconPattern = new RegExp(`#${finder.iconName}$`);
|
|
9
|
-
const selector = (0, create_selector_1.createSelector)(finder)
|
|
10
|
-
.find("use")
|
|
11
|
-
.withAttribute("xlink:href", iconPattern)
|
|
12
|
-
.nth((_a = finder.nth) !== null && _a !== void 0 ? _a : 0);
|
|
13
|
-
const clickableParent = selector.parent("a");
|
|
14
|
-
return {
|
|
15
|
-
click() {
|
|
16
|
-
return testcafe_1.t.click(clickableParent);
|
|
17
|
-
},
|
|
18
|
-
shouldExists() {
|
|
19
|
-
return testcafe_1.t
|
|
20
|
-
.expect(clickableParent.exists)
|
|
21
|
-
.ok(`Icon with xlink:href containing "${iconPattern}" should exist but does not.`);
|
|
22
|
-
},
|
|
23
|
-
shouldNotExists() {
|
|
24
|
-
return testcafe_1.t
|
|
25
|
-
.expect(clickableParent.exists)
|
|
26
|
-
.notOk(`Icon with xlink:href containing "${iconPattern}" should not exist but it does.`);
|
|
27
|
-
},
|
|
28
|
-
shouldBeDisabled() {
|
|
29
|
-
return testcafe_1.t
|
|
30
|
-
.expect(clickableParent.hasClass("is-disabled"))
|
|
31
|
-
.ok(`Icon button with xlink:href containing ${iconPattern} should be disabled but it is not disabled or does not exist`);
|
|
32
|
-
},
|
|
33
|
-
shouldNotBeDisabled() {
|
|
34
|
-
return testcafe_1.t
|
|
35
|
-
.expect(clickableParent.hasClass("is-disabled"))
|
|
36
|
-
.notOk(`Icon button with xlink:href containing ${iconPattern} should be enabled but it is not enabled or does not exist`);
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
}
|
package/ui/input.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface InputFinder extends BaseFinder {
|
|
3
|
-
name: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function input(finder: InputFinder): {
|
|
6
|
-
type(value: string): TestControllerPromise<any>;
|
|
7
|
-
replace(value: string): TestControllerPromise<any>;
|
|
8
|
-
shouldHaveValue(value: string): TestControllerPromise<any>;
|
|
9
|
-
shouldBeDisabled(): TestControllerPromise<any>;
|
|
10
|
-
shouldNotBeDisabled(): TestControllerPromise<any>;
|
|
11
|
-
shouldExist(): TestControllerPromise<any>;
|
|
12
|
-
shouldNotExist(): TestControllerPromise<any>;
|
|
13
|
-
};
|
|
14
|
-
export {};
|
package/ui/input.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.input = input;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function input(finder) {
|
|
7
|
-
const inputElementSelector = (0, create_selector_1.createSelector)(finder).find(".uxf-input__element").withAttribute("name", finder.name);
|
|
8
|
-
return {
|
|
9
|
-
type(value) {
|
|
10
|
-
return testcafe_1.t.typeText(inputElementSelector, value);
|
|
11
|
-
},
|
|
12
|
-
replace(value) {
|
|
13
|
-
return testcafe_1.t.typeText(inputElementSelector, value, { replace: true });
|
|
14
|
-
},
|
|
15
|
-
shouldHaveValue(value) {
|
|
16
|
-
return testcafe_1.t.expect(inputElementSelector.value).eql(value);
|
|
17
|
-
},
|
|
18
|
-
shouldBeDisabled() {
|
|
19
|
-
return testcafe_1.t.expect(inputElementSelector.hasAttribute("disabled")).ok();
|
|
20
|
-
},
|
|
21
|
-
shouldNotBeDisabled() {
|
|
22
|
-
return testcafe_1.t.expect(inputElementSelector.hasAttribute("disabled")).notOk();
|
|
23
|
-
},
|
|
24
|
-
shouldExist() {
|
|
25
|
-
return testcafe_1.t.expect(inputElementSelector.exists).ok();
|
|
26
|
-
},
|
|
27
|
-
shouldNotExist() {
|
|
28
|
-
return testcafe_1.t.expect(inputElementSelector.exists).notOk();
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
}
|
package/ui/message.d.ts
DELETED
package/ui/message.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.message = message;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function message(finder) {
|
|
7
|
-
const modalSelector = (0, create_selector_1.createSelector)(finder).find(".uxf-message__content");
|
|
8
|
-
return {
|
|
9
|
-
shouldExist() {
|
|
10
|
-
return testcafe_1.t.expect(modalSelector.exists).ok();
|
|
11
|
-
},
|
|
12
|
-
shouldNotExist() {
|
|
13
|
-
return testcafe_1.t.expect(modalSelector.exists).notOk();
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
}
|
package/ui/modal.d.ts
DELETED
package/ui/modal.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.modal = modal;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function modal(finder) {
|
|
7
|
-
const modalSelector = (0, create_selector_1.createSelector)(finder).find(".uxf-dialog__body");
|
|
8
|
-
return {
|
|
9
|
-
shouldExist(timeout = 0) {
|
|
10
|
-
return testcafe_1.t.expect(modalSelector.exists).ok({ timeout });
|
|
11
|
-
},
|
|
12
|
-
shouldNotExist(timeout = 0) {
|
|
13
|
-
return testcafe_1.t.expect(modalSelector.exists).notOk({ timeout });
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
}
|
package/ui/multi-combobox.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface MultiComboboxFinder extends BaseFinder {
|
|
3
|
-
dataName: string;
|
|
4
|
-
nth?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function multiCombobox(finder: MultiComboboxFinder): {
|
|
7
|
-
selectItemByTypeText(optionText: string, timeout?: number, index?: number): TestControllerPromise<any>;
|
|
8
|
-
selectItemFromDropdown(optionText: string, timeout?: number): TestControllerPromise<any>;
|
|
9
|
-
shouldExist(timeout?: number): TestControllerPromise<any>;
|
|
10
|
-
shouldBeDisabled(timeout?: number): TestControllerPromise<any>;
|
|
11
|
-
shouldBeInvalid(timeout?: number): TestControllerPromise<any>;
|
|
12
|
-
replace(optionText: string, index?: number): TestControllerPromise<any>;
|
|
13
|
-
shouldHaveValue(value: string, timeout?: number): TestControllerPromise<any>;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
package/ui/multi-combobox.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.multiCombobox = multiCombobox;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function multiCombobox(finder) {
|
|
7
|
-
var _a;
|
|
8
|
-
const multiComboboxSelector = (0, create_selector_1.createSelector)(finder)
|
|
9
|
-
.find(".uxf-multi-combobox")
|
|
10
|
-
.withAttribute("data-name", finder.dataName)
|
|
11
|
-
.nth((_a = finder.nth) !== null && _a !== void 0 ? _a : 0)
|
|
12
|
-
.find(".uxf-multi-combobox__button");
|
|
13
|
-
return {
|
|
14
|
-
selectItemByTypeText(optionText, timeout = 0, index = 0) {
|
|
15
|
-
return testcafe_1.t
|
|
16
|
-
.typeText(multiComboboxSelector, optionText)
|
|
17
|
-
.expect((0, testcafe_1.Selector)("li.uxf-dropdown__item").nth(index).exists)
|
|
18
|
-
.ok({ timeout })
|
|
19
|
-
.click((0, testcafe_1.Selector)(".uxf-dropdown__item").nth(index))
|
|
20
|
-
.click(multiComboboxSelector.find(".uxf-input__arrow-icon"));
|
|
21
|
-
},
|
|
22
|
-
selectItemFromDropdown(optionText, timeout = 0) {
|
|
23
|
-
return testcafe_1.t
|
|
24
|
-
.click(multiComboboxSelector)
|
|
25
|
-
.expect((0, testcafe_1.Selector)(".uxf-dropdown__item").withText(optionText).exists)
|
|
26
|
-
.ok({ timeout })
|
|
27
|
-
.click((0, testcafe_1.Selector)(".uxf-dropdown__item").withText(optionText))
|
|
28
|
-
.click(multiComboboxSelector.find(".uxf-input__arrow-icon"));
|
|
29
|
-
},
|
|
30
|
-
shouldExist(timeout = 0) {
|
|
31
|
-
return testcafe_1.t.expect(multiComboboxSelector.exists).ok({ timeout });
|
|
32
|
-
},
|
|
33
|
-
shouldBeDisabled(timeout = 0) {
|
|
34
|
-
return testcafe_1.t.expect(multiComboboxSelector.hasClass("is-disabled")).ok({ timeout });
|
|
35
|
-
},
|
|
36
|
-
shouldBeInvalid(timeout = 0) {
|
|
37
|
-
return testcafe_1.t.expect(multiComboboxSelector.hasClass("is-invalid")).ok({ timeout });
|
|
38
|
-
},
|
|
39
|
-
replace(optionText, index = 0) {
|
|
40
|
-
return testcafe_1.t
|
|
41
|
-
.typeText(multiComboboxSelector, optionText, { replace: true })
|
|
42
|
-
.click((0, testcafe_1.Selector)(".uxf-dropdown__item").nth(index));
|
|
43
|
-
},
|
|
44
|
-
shouldHaveValue(value, timeout = 0) {
|
|
45
|
-
return testcafe_1.t
|
|
46
|
-
.expect(multiComboboxSelector.find(".uxf-multi-combobox__selected-options").textContent)
|
|
47
|
-
.contains(value, { timeout });
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
}
|
package/ui/multi-select.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface MultiSelectFinder extends BaseFinder {
|
|
3
|
-
dataName: string;
|
|
4
|
-
nth?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function multiSelect(finder: MultiSelectFinder): {
|
|
7
|
-
selectItemsByText(optionTexts: string[]): Promise<void>;
|
|
8
|
-
selectItemsByIndex(indexes: number[]): Promise<void>;
|
|
9
|
-
shouldExist(): TestControllerPromise<any>;
|
|
10
|
-
shouldBeDisabled(): TestControllerPromise<any>;
|
|
11
|
-
shouldBeInvalid(): TestControllerPromise<any>;
|
|
12
|
-
removeItemsByText(optionTexts: string[]): Promise<void>;
|
|
13
|
-
removeItemsByIndex(indexes: number[]): Promise<void>;
|
|
14
|
-
shouldHaveValues(optionTexts: string[]): Promise<void>;
|
|
15
|
-
shouldNotHaveValues(optionTexts: string[]): Promise<void>;
|
|
16
|
-
};
|
|
17
|
-
export {};
|