@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/multi-select.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.multiSelect = multiSelect;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function multiSelect(finder) {
|
|
7
|
-
var _a;
|
|
8
|
-
const multiSelectSelector = (0, create_selector_1.createSelector)(finder)
|
|
9
|
-
.find(".uxf-multi-select")
|
|
10
|
-
.withAttribute("data-name", finder.dataName)
|
|
11
|
-
.nth((_a = finder.nth) !== null && _a !== void 0 ? _a : 0)
|
|
12
|
-
.find(".uxf-multi-select__button");
|
|
13
|
-
return {
|
|
14
|
-
async selectItemsByText(optionTexts) {
|
|
15
|
-
await testcafe_1.t.click(multiSelectSelector);
|
|
16
|
-
await optionTexts.reduce((promise, optionText) => promise.then(() => testcafe_1.t.click((0, testcafe_1.Selector)(".uxf-dropdown__item").withText(optionText))), Promise.resolve());
|
|
17
|
-
await testcafe_1.t.click(multiSelectSelector.find(".uxf-input__arrow-icon"));
|
|
18
|
-
},
|
|
19
|
-
async selectItemsByIndex(indexes) {
|
|
20
|
-
await testcafe_1.t.click(multiSelectSelector);
|
|
21
|
-
await indexes.reduce((promise, index) => promise.then(() => testcafe_1.t.click((0, testcafe_1.Selector)(".uxf-dropdown__item").nth(index))), Promise.resolve());
|
|
22
|
-
await testcafe_1.t.click(multiSelectSelector.find(".uxf-input__arrow-icon"));
|
|
23
|
-
},
|
|
24
|
-
shouldExist() {
|
|
25
|
-
return testcafe_1.t.expect(multiSelectSelector.exists).ok();
|
|
26
|
-
},
|
|
27
|
-
shouldBeDisabled() {
|
|
28
|
-
return testcafe_1.t.expect(multiSelectSelector.hasClass("is-disabled")).ok();
|
|
29
|
-
},
|
|
30
|
-
shouldBeInvalid() {
|
|
31
|
-
return testcafe_1.t.expect(multiSelectSelector.hasClass("is-invalid")).ok();
|
|
32
|
-
},
|
|
33
|
-
async removeItemsByText(optionTexts) {
|
|
34
|
-
await optionTexts.reduce((promise, text) => promise.then(() => testcafe_1.t.click((0, testcafe_1.Selector)(multiSelectSelector).find(".uxf-chip").withText(text).find(".uxf-chip__button"))), Promise.resolve());
|
|
35
|
-
},
|
|
36
|
-
async removeItemsByIndex(indexes) {
|
|
37
|
-
await indexes.reduce((promise, index) => promise.then(() => testcafe_1.t.click((0, testcafe_1.Selector)(multiSelectSelector).find(".uxf-chip__button").nth(index))), Promise.resolve());
|
|
38
|
-
},
|
|
39
|
-
async shouldHaveValues(optionTexts) {
|
|
40
|
-
await optionTexts.reduce((promise, text) => promise.then(() => testcafe_1.t
|
|
41
|
-
.expect((0, testcafe_1.Selector)(multiSelectSelector).find(".uxf-chip").withText(text).exists)
|
|
42
|
-
.ok(`item "${text}" does not exists but it should exists`)), Promise.resolve());
|
|
43
|
-
},
|
|
44
|
-
async shouldNotHaveValues(optionTexts) {
|
|
45
|
-
await optionTexts.reduce((promise, text) => promise.then(() => testcafe_1.t
|
|
46
|
-
.expect((0, testcafe_1.Selector)(multiSelectSelector).find(".uxf-chip").withText(text).exists)
|
|
47
|
-
.notOk(`item "${text}" exists but it should not exist`)), Promise.resolve());
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
}
|
package/ui/radio-group.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface RadioGroupFinder extends BaseFinder {
|
|
3
|
-
id: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function radioGroup(finder: RadioGroupFinder): {
|
|
6
|
-
selectByText(text: string): TestControllerPromise<any>;
|
|
7
|
-
shouldBeSelected(text: string): TestControllerPromise<any>;
|
|
8
|
-
shouldNotBeSelected(text: string): TestControllerPromise<any>;
|
|
9
|
-
};
|
|
10
|
-
export {};
|
package/ui/radio-group.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.radioGroup = radioGroup;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function radioGroup(finder) {
|
|
7
|
-
const radioGroupSelector = (0, create_selector_1.createSelector)(finder).find(".uxf-radio-group").withAttribute("id", finder.id);
|
|
8
|
-
return {
|
|
9
|
-
selectByText(text) {
|
|
10
|
-
return testcafe_1.t.click(radioGroupSelector.find(".uxf-radio-group__option").withText(text));
|
|
11
|
-
},
|
|
12
|
-
shouldBeSelected(text) {
|
|
13
|
-
return testcafe_1.t
|
|
14
|
-
.expect(radioGroupSelector
|
|
15
|
-
.find(".uxf-radio-group__option-wrapper")
|
|
16
|
-
.withExactText(text)
|
|
17
|
-
.hasClass("is-selected"))
|
|
18
|
-
.ok();
|
|
19
|
-
},
|
|
20
|
-
shouldNotBeSelected(text) {
|
|
21
|
-
return testcafe_1.t
|
|
22
|
-
.expect(radioGroupSelector
|
|
23
|
-
.find(".uxf-radio-group__option-wrapper")
|
|
24
|
-
.withExactText(text)
|
|
25
|
-
.hasClass("is-selected"))
|
|
26
|
-
.notOk();
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
}
|
package/ui/select.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface SelectInputFinder extends BaseFinder {
|
|
3
|
-
dataName: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function select(finder: SelectInputFinder, selectIndex?: number): {
|
|
6
|
-
selectNthItem(nth: number): TestControllerPromise<any>;
|
|
7
|
-
selectItemWithText(optionText: string, nth?: number): TestControllerPromise<any>;
|
|
8
|
-
shouldHaveValue(value: string): TestControllerPromise<any>;
|
|
9
|
-
shouldBeEmpty(): TestControllerPromise<any>;
|
|
10
|
-
shouldNotBeEmpty(): TestControllerPromise<any>;
|
|
11
|
-
shouldBeDisabled(): TestControllerPromise<any>;
|
|
12
|
-
shouldNotBeDisabled(): TestControllerPromise<any>;
|
|
13
|
-
shouldExists(): TestControllerPromise<any>;
|
|
14
|
-
shouldNotExists(): TestControllerPromise<any>;
|
|
15
|
-
clear(): TestControllerPromise<any>;
|
|
16
|
-
};
|
|
17
|
-
export {};
|
package/ui/select.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.select = select;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function select(finder, selectIndex = 0) {
|
|
7
|
-
const buttonSelector = (0, create_selector_1.createSelector)(finder)
|
|
8
|
-
.find(".uxf-select")
|
|
9
|
-
.withAttribute("data-name", finder.dataName)
|
|
10
|
-
.nth(selectIndex)
|
|
11
|
-
.find("div.uxf-input__element");
|
|
12
|
-
return {
|
|
13
|
-
selectNthItem(nth) {
|
|
14
|
-
// TODO - asi použít helper na dropdown až bude existovat
|
|
15
|
-
return testcafe_1.t.click(buttonSelector).click((0, testcafe_1.Selector)(".uxf-dropdown__item").nth(nth));
|
|
16
|
-
},
|
|
17
|
-
selectItemWithText(optionText, nth = 0) {
|
|
18
|
-
return testcafe_1.t.click(buttonSelector).click((0, testcafe_1.Selector)(".uxf-dropdown__item").withText(optionText).nth(nth));
|
|
19
|
-
},
|
|
20
|
-
shouldHaveValue(value) {
|
|
21
|
-
return testcafe_1.t.expect(buttonSelector.textContent).eql(value);
|
|
22
|
-
},
|
|
23
|
-
shouldBeEmpty() {
|
|
24
|
-
return testcafe_1.t.expect(buttonSelector.hasClass("is-empty")).ok();
|
|
25
|
-
},
|
|
26
|
-
shouldNotBeEmpty() {
|
|
27
|
-
return testcafe_1.t.expect(buttonSelector.hasClass("is-empty")).notOk();
|
|
28
|
-
},
|
|
29
|
-
shouldBeDisabled() {
|
|
30
|
-
return testcafe_1.t.expect(buttonSelector.parent(1).hasClass("is-disabled")).ok();
|
|
31
|
-
},
|
|
32
|
-
shouldNotBeDisabled() {
|
|
33
|
-
return testcafe_1.t.expect(buttonSelector.parent(1).hasClass("is-disabled")).notOk();
|
|
34
|
-
},
|
|
35
|
-
shouldExists() {
|
|
36
|
-
return testcafe_1.t.expect(buttonSelector.exists).ok(`Select with data-name: ${finder.dataName} should exists`);
|
|
37
|
-
},
|
|
38
|
-
shouldNotExists() {
|
|
39
|
-
return testcafe_1.t.expect(buttonSelector.exists).notOk(`Select with data-name: ${finder.dataName} should not exists`);
|
|
40
|
-
},
|
|
41
|
-
clear() {
|
|
42
|
-
return testcafe_1.t.click(buttonSelector.nextSibling().find(".uxf-input__remove-button"));
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
}
|
package/ui/text-input.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface TextInputFinder extends BaseFinder {
|
|
3
|
-
name: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function textInput(finder: TextInputFinder): {
|
|
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/text-input.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.textInput = textInput;
|
|
4
|
-
const input_1 = require("./input");
|
|
5
|
-
function textInput(finder) {
|
|
6
|
-
return {
|
|
7
|
-
type(value) {
|
|
8
|
-
return (0, input_1.input)(finder).type(value);
|
|
9
|
-
},
|
|
10
|
-
replace(value) {
|
|
11
|
-
return (0, input_1.input)(finder).replace(value);
|
|
12
|
-
},
|
|
13
|
-
shouldHaveValue(value) {
|
|
14
|
-
return (0, input_1.input)(finder).shouldHaveValue(value);
|
|
15
|
-
},
|
|
16
|
-
shouldBeDisabled() {
|
|
17
|
-
return (0, input_1.input)(finder).shouldBeDisabled();
|
|
18
|
-
},
|
|
19
|
-
shouldNotBeDisabled() {
|
|
20
|
-
return (0, input_1.input)(finder).shouldNotBeDisabled();
|
|
21
|
-
},
|
|
22
|
-
shouldExist() {
|
|
23
|
-
return (0, input_1.input)(finder).shouldExist();
|
|
24
|
-
},
|
|
25
|
-
shouldNotExist() {
|
|
26
|
-
return (0, input_1.input)(finder).shouldNotExist();
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
}
|
package/ui/text-link.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface TextLinkFinder extends BaseFinder {
|
|
3
|
-
text: string;
|
|
4
|
-
nth?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function textLink(finder: TextLinkFinder): {
|
|
7
|
-
click(): TestControllerPromise<any>;
|
|
8
|
-
shouldExists(timeout?: number): TestControllerPromise<any>;
|
|
9
|
-
shouldNotExists(timeout?: number): TestControllerPromise<any>;
|
|
10
|
-
};
|
|
11
|
-
export {};
|
package/ui/text-link.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.textLink = textLink;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function textLink(finder) {
|
|
7
|
-
var _a;
|
|
8
|
-
const textLinkSelector = (0, create_selector_1.createSelector)(finder)
|
|
9
|
-
.find("a.uxf-text-link")
|
|
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(textLinkSelector);
|
|
15
|
-
},
|
|
16
|
-
shouldExists(timeout = 0) {
|
|
17
|
-
return testcafe_1.t.expect(textLinkSelector.exists).ok({ timeout });
|
|
18
|
-
},
|
|
19
|
-
shouldNotExists(timeout = 0) {
|
|
20
|
-
return testcafe_1.t.expect(textLinkSelector.exists).notOk({ timeout });
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
}
|
package/ui/textarea.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface TextareaFinder extends BaseFinder {
|
|
3
|
-
dataName: string;
|
|
4
|
-
nth?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function textarea(finder: TextareaFinder): {
|
|
7
|
-
type(value: string): TestControllerPromise<any>;
|
|
8
|
-
replace(value: string): TestControllerPromise<any>;
|
|
9
|
-
shouldHaveValue(value: string): TestControllerPromise<any>;
|
|
10
|
-
shouldBeDisabled(): TestControllerPromise<any>;
|
|
11
|
-
shouldNotBeDisabled(): TestControllerPromise<any>;
|
|
12
|
-
shouldBeReadonly(): TestControllerPromise<any>;
|
|
13
|
-
};
|
|
14
|
-
export {};
|
package/ui/textarea.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.textarea = textarea;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function textarea(finder) {
|
|
7
|
-
var _a;
|
|
8
|
-
const textareaSelector = (0, create_selector_1.createSelector)(finder)
|
|
9
|
-
.find(".uxf-textarea")
|
|
10
|
-
.withAttribute("data-name", finder.dataName)
|
|
11
|
-
.nth((_a = finder.nth) !== null && _a !== void 0 ? _a : 0);
|
|
12
|
-
return {
|
|
13
|
-
type(value) {
|
|
14
|
-
return testcafe_1.t.typeText(textareaSelector.find("textarea"), value);
|
|
15
|
-
},
|
|
16
|
-
replace(value) {
|
|
17
|
-
return testcafe_1.t.typeText(textareaSelector.find("textarea"), value, { replace: true });
|
|
18
|
-
},
|
|
19
|
-
shouldHaveValue(value) {
|
|
20
|
-
return testcafe_1.t.expect(textareaSelector.find("textarea").value).eql(value);
|
|
21
|
-
},
|
|
22
|
-
shouldBeDisabled() {
|
|
23
|
-
return testcafe_1.t.expect(textareaSelector.hasClass("is-disabled")).ok();
|
|
24
|
-
},
|
|
25
|
-
shouldNotBeDisabled() {
|
|
26
|
-
return testcafe_1.t.expect(textareaSelector.hasClass("is-disabled")).notOk();
|
|
27
|
-
},
|
|
28
|
-
shouldBeReadonly() {
|
|
29
|
-
return testcafe_1.t.expect(textareaSelector.hasClass("is-readonly")).ok();
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
}
|
package/ui/toggle.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface ToggleFinder extends BaseFinder {
|
|
3
|
-
text: string;
|
|
4
|
-
nth?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function toggle(finder: ToggleFinder): {
|
|
7
|
-
click(): TestControllerPromise<any>;
|
|
8
|
-
shouldExists(): TestControllerPromise<any>;
|
|
9
|
-
shouldNotExists(): TestControllerPromise<any>;
|
|
10
|
-
shouldBeDisabled(): TestControllerPromise<any>;
|
|
11
|
-
shouldNotBeDisabled(): TestControllerPromise<any>;
|
|
12
|
-
shouldNotBeSelected(): TestControllerPromise<any>;
|
|
13
|
-
shouldBeSelected(): TestControllerPromise<any>;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
package/ui/toggle.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toggle = toggle;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function toggle(finder) {
|
|
7
|
-
var _a;
|
|
8
|
-
const selector = (0, create_selector_1.createSelector)(finder)
|
|
9
|
-
.find(".uxf-toggle__wrapper")
|
|
10
|
-
.withExactText(finder.text)
|
|
11
|
-
.nth((_a = finder.nth) !== null && _a !== void 0 ? _a : 0)
|
|
12
|
-
.find("button");
|
|
13
|
-
return {
|
|
14
|
-
click() {
|
|
15
|
-
return testcafe_1.t.click(selector);
|
|
16
|
-
},
|
|
17
|
-
shouldExists() {
|
|
18
|
-
return testcafe_1.t.expect(selector.exists).ok(`Toggle with text ${finder.text} should exists but it was not found.`);
|
|
19
|
-
},
|
|
20
|
-
shouldNotExists() {
|
|
21
|
-
return testcafe_1.t
|
|
22
|
-
.expect(selector.exists)
|
|
23
|
-
.notOk(`Toggle with text ${finder.text} should not exists but it was found`);
|
|
24
|
-
},
|
|
25
|
-
shouldBeDisabled() {
|
|
26
|
-
return testcafe_1.t
|
|
27
|
-
.expect(selector.hasClass("is-disabled"))
|
|
28
|
-
.ok(`Toggle with text ${finder.text} should be disabled but it is not disabled or not found.`);
|
|
29
|
-
},
|
|
30
|
-
shouldNotBeDisabled() {
|
|
31
|
-
return testcafe_1.t
|
|
32
|
-
.expect(selector.hasClass("is-disabled"))
|
|
33
|
-
.notOk(`Toggle with text ${finder.text} should be enabled but it is disabled or not found.`);
|
|
34
|
-
},
|
|
35
|
-
shouldNotBeSelected() {
|
|
36
|
-
return testcafe_1.t
|
|
37
|
-
.expect(selector.hasClass("is-selected"))
|
|
38
|
-
.notOk(`Toggle with text ${finder.text} should not be selected but it is selected.`);
|
|
39
|
-
},
|
|
40
|
-
shouldBeSelected() {
|
|
41
|
-
return testcafe_1.t
|
|
42
|
-
.expect(selector.hasClass("is-selected"))
|
|
43
|
-
.ok(`Toggle with text ${finder.text} should be selected bu it is not selected.`);
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
}
|
package/ui/toolbar-tab.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BaseFinder } from "../utils/base-finder";
|
|
2
|
-
interface ToolbarTab extends BaseFinder {
|
|
3
|
-
text: string;
|
|
4
|
-
nth?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function toolbarTab(finder: ToolbarTab): {
|
|
7
|
-
click(): TestControllerPromise<any>;
|
|
8
|
-
shouldExists(): TestControllerPromise<any>;
|
|
9
|
-
shouldNotExists(): TestControllerPromise<any>;
|
|
10
|
-
shouldNotBeActive(): TestControllerPromise<any>;
|
|
11
|
-
shouldBeActive(): TestControllerPromise<any>;
|
|
12
|
-
};
|
|
13
|
-
export {};
|
package/ui/toolbar-tab.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toolbarTab = toolbarTab;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
const create_selector_1 = require("../utils/create-selector");
|
|
6
|
-
function toolbarTab(finder) {
|
|
7
|
-
var _a;
|
|
8
|
-
const selector = (0, create_selector_1.createSelector)(finder)
|
|
9
|
-
.find(".uxf-data-grid__toolbar-tab")
|
|
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
|
|
18
|
-
.expect(selector.exists)
|
|
19
|
-
.ok(`Toolbar tab with text ${finder.text} should exists but it was not found.`);
|
|
20
|
-
},
|
|
21
|
-
shouldNotExists() {
|
|
22
|
-
return testcafe_1.t
|
|
23
|
-
.expect(selector.exists)
|
|
24
|
-
.notOk(`Toolbar tab with text ${finder.text} should not exists but it was found`);
|
|
25
|
-
},
|
|
26
|
-
shouldNotBeActive() {
|
|
27
|
-
return testcafe_1.t
|
|
28
|
-
.expect(selector.hasClass("is-active"))
|
|
29
|
-
.notOk(`Toolbar tab with text ${finder.text} should not be selected but it is active.`);
|
|
30
|
-
},
|
|
31
|
-
shouldBeActive() {
|
|
32
|
-
return testcafe_1.t
|
|
33
|
-
.expect(selector.hasClass("is-active"))
|
|
34
|
-
.ok(`Toolbar tab with text ${finder.text} should be selected bu it is not active.`);
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
}
|
package/utils/base-finder.d.ts
DELETED
package/utils/base-finder.js
DELETED
package/utils/create-selector.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createSelector = createSelector;
|
|
4
|
-
const root_selector_1 = require("./root-selector");
|
|
5
|
-
function createSelector(selector) {
|
|
6
|
-
var _a;
|
|
7
|
-
return (_a = selector.parent) !== null && _a !== void 0 ? _a : root_selector_1.RootSelector;
|
|
8
|
-
}
|
package/utils/root-selector.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const RootSelector: Selector;
|
package/utils/root-selector.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function waitForReact(timeout: any, testController: any): Promise<Promise<unknown>>;
|
package/utils/wait-for-react.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.waitForReact = waitForReact;
|
|
4
|
-
const testcafe_1 = require("testcafe");
|
|
5
|
-
// TODO - klasická funkce waitForReact nefunguje s AppDirectory v nextu :-)
|
|
6
|
-
function waitForReact(timeout, testController) {
|
|
7
|
-
const DEFAULT_TIMEOUT = 1e4;
|
|
8
|
-
const checkTimeout = typeof timeout === "number" ? timeout : DEFAULT_TIMEOUT;
|
|
9
|
-
return (0, testcafe_1.ClientFunction)(() => {
|
|
10
|
-
const CHECK_INTERVAL = 200;
|
|
11
|
-
let stopChecking = false;
|
|
12
|
-
function findReact16to18Root() {
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
14
|
-
// @ts-ignore
|
|
15
|
-
const treeWalker = document.createTreeWalker(document, NodeFilter.SHOW_ELEMENT, null, false);
|
|
16
|
-
while (treeWalker.nextNode()) {
|
|
17
|
-
//NOTE: react 18
|
|
18
|
-
for (const prop of Object.keys(treeWalker.currentNode)) {
|
|
19
|
-
if (/^__reactContainer|^__reactProps/.test(prop)) {
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
function findReactApp() {
|
|
27
|
-
return findReact16to18Root();
|
|
28
|
-
}
|
|
29
|
-
return new Promise((resolve, reject) => {
|
|
30
|
-
function tryFindReactApp() {
|
|
31
|
-
const startTime = new Date();
|
|
32
|
-
const reactTreeIsFound = findReactApp();
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
const checkTime = new Date() - startTime;
|
|
36
|
-
if (reactTreeIsFound) {
|
|
37
|
-
resolve();
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
if (stopChecking) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
setTimeout(tryFindReactApp, checkTime > CHECK_INTERVAL ? checkTime : CHECK_INTERVAL);
|
|
44
|
-
}
|
|
45
|
-
tryFindReactApp();
|
|
46
|
-
setTimeout(() => {
|
|
47
|
-
stopChecking = true;
|
|
48
|
-
reject("waitForReact: The waiting timeout is exceeded");
|
|
49
|
-
}, checkTimeout);
|
|
50
|
-
});
|
|
51
|
-
}, { dependencies: { checkTimeout }, boundTestRun: testController })();
|
|
52
|
-
}
|