@uxf/e2e 11.61.0 → 11.64.5
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/cms/menu.d.ts +1 -1
- package/cms/menu.js +7 -7
- package/package.json +1 -1
- package/tests/combobox.e2e.js +8 -8
- package/tests/flash-message.e2e.js +2 -2
- package/tests/modal.e2e.js +4 -4
- package/tests/multi-combobox.e2e.js +8 -8
- package/ui/combobox.d.ts +8 -8
- package/ui/combobox.js +21 -15
- package/ui/flash-message.d.ts +3 -3
- package/ui/flash-message.js +6 -6
- package/ui/modal.d.ts +2 -2
- package/ui/modal.js +4 -4
- package/ui/multi-combobox.d.ts +6 -6
- package/ui/multi-combobox.js +20 -12
package/cms/menu.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function menu(): {
|
|
2
|
-
openLink(mainLabel: string, subLabel?: string): TestControllerPromise<any>;
|
|
2
|
+
openLink(mainLabel: string, subLabel?: string, index?: number): TestControllerPromise<any>;
|
|
3
3
|
openBurgerMenu(): TestControllerPromise<any>;
|
|
4
4
|
openUserMenu(): TestControllerPromise<any>;
|
|
5
5
|
openUserMenuLink(userMenuLabel: string, device?: "mobile" | "desktop"): TestControllerPromise<any>;
|
package/cms/menu.js
CHANGED
|
@@ -5,11 +5,11 @@ const testcafe_1 = require("testcafe");
|
|
|
5
5
|
const menuLinkFinder = (0, testcafe_1.Selector)(".uxf-cms-menu__item-label");
|
|
6
6
|
function menu() {
|
|
7
7
|
return {
|
|
8
|
-
openLink(mainLabel, subLabel) {
|
|
8
|
+
openLink(mainLabel, subLabel, index = 0) {
|
|
9
9
|
if (!subLabel) {
|
|
10
|
-
return testcafe_1.t.click(menuLinkFinder.
|
|
10
|
+
return testcafe_1.t.click(menuLinkFinder.withText(mainLabel).nth(index));
|
|
11
11
|
}
|
|
12
|
-
return testcafe_1.t.click(menuLinkFinder.
|
|
12
|
+
return testcafe_1.t.click(menuLinkFinder.withText(mainLabel)).click(menuLinkFinder.withText(subLabel));
|
|
13
13
|
},
|
|
14
14
|
openBurgerMenu() {
|
|
15
15
|
return testcafe_1.t.click((0, testcafe_1.Selector)(".uxf-cms-mobile-bar__button").nth(-1));
|
|
@@ -19,15 +19,15 @@ function menu() {
|
|
|
19
19
|
},
|
|
20
20
|
openUserMenuLink(userMenuLabel, device = "desktop") {
|
|
21
21
|
if (device === "desktop") {
|
|
22
|
-
return testcafe_1.t.click((0, testcafe_1.Selector)(menuLinkFinder).
|
|
22
|
+
return testcafe_1.t.click((0, testcafe_1.Selector)(menuLinkFinder).withText(userMenuLabel).nth(1));
|
|
23
23
|
}
|
|
24
|
-
return testcafe_1.t.click((0, testcafe_1.Selector)(menuLinkFinder).
|
|
24
|
+
return testcafe_1.t.click((0, testcafe_1.Selector)(menuLinkFinder).withText(userMenuLabel));
|
|
25
25
|
},
|
|
26
26
|
shouldExistsLink(label) {
|
|
27
|
-
return testcafe_1.t.expect(menuLinkFinder.
|
|
27
|
+
return testcafe_1.t.expect(menuLinkFinder.withText(label).exists).ok();
|
|
28
28
|
},
|
|
29
29
|
shouldNotExistsLink(label) {
|
|
30
|
-
return testcafe_1.t.expect(menuLinkFinder.
|
|
30
|
+
return testcafe_1.t.expect(menuLinkFinder.withText(label).exists).notOk();
|
|
31
31
|
},
|
|
32
32
|
};
|
|
33
33
|
}
|
package/package.json
CHANGED
package/tests/combobox.e2e.js
CHANGED
|
@@ -13,17 +13,17 @@ const wait_for_react_1 = require("../utils/wait-for-react");
|
|
|
13
13
|
(0, testcafe_1.test)("Combobox", async () => {
|
|
14
14
|
const defaultCombobox = components_1.components.combobox({ dataName: "firstname" });
|
|
15
15
|
await components_1.components.button({ text: "Submit" }).click();
|
|
16
|
-
await components_1.components.combobox({ dataName: "combobox-required" }).shouldBeInvalid();
|
|
16
|
+
await components_1.components.combobox({ dataName: "combobox-required" }).shouldBeInvalid(1000);
|
|
17
17
|
await components_1.components.combobox({ dataName: "combobox-required" }).shouldShowInvalidText("Toto pole je povinné");
|
|
18
18
|
await components_1.components.combobox({ dataName: "combobox-required" }).shouldBeRequired();
|
|
19
|
-
await defaultCombobox.shouldExist();
|
|
20
|
-
await defaultCombobox.shouldBeEmpty();
|
|
21
|
-
await defaultCombobox.selectItemWithTextFromDropdown("Option one");
|
|
22
|
-
await defaultCombobox.shouldHaveValue("Option one");
|
|
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
23
|
await components_1.components.combobox({ dataName: "combobox-required" }).replace("Option three");
|
|
24
|
-
await components_1.components.combobox({ dataName: "combobox-required" }).shouldHaveValue("Option three");
|
|
25
|
-
await components_1.components.combobox({ dataName: "combobox-disabled" }).shouldBeDisabled();
|
|
26
|
-
await components_1.components.combobox({ dataName: "firstname" }).shouldNotBeDisabled();
|
|
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
27
|
await (0, testcafe_1.ClientFunction)(() => {
|
|
28
28
|
document.location.reload();
|
|
29
29
|
})();
|
|
@@ -14,6 +14,6 @@ const wait_for_react_1 = require("../utils/wait-for-react");
|
|
|
14
14
|
(0, testcafe_1.test)("Flash message", async () => {
|
|
15
15
|
await (0, flash_message_1.flashMessage)().shouldNotExists();
|
|
16
16
|
await (0, button_1.button)({ text: "Click to fire Flash message, variant success" }).click();
|
|
17
|
-
await (0, flash_message_1.flashMessage)().shouldExists();
|
|
18
|
-
await (0, flash_message_1.flashMessage)().shouldContainsText("Everything is alright.");
|
|
17
|
+
await (0, flash_message_1.flashMessage)().shouldExists(1000);
|
|
18
|
+
await (0, flash_message_1.flashMessage)().shouldContainsText("Everything is alright.", 1000);
|
|
19
19
|
});
|
package/tests/modal.e2e.js
CHANGED
|
@@ -12,12 +12,12 @@ const wait_for_react_1 = require("../utils/wait-for-react");
|
|
|
12
12
|
});
|
|
13
13
|
(0, testcafe_1.test)("UI Modal", async (t) => {
|
|
14
14
|
await components_1.components.button({ text: "Click to open modal - default" }).click();
|
|
15
|
-
await components_1.components.modal({}).shouldExist();
|
|
15
|
+
await components_1.components.modal({}).shouldExist(1000);
|
|
16
16
|
await components_1.components.button({ text: "Close modal" }).click();
|
|
17
|
-
await components_1.components.modal({}).shouldNotExist();
|
|
17
|
+
await components_1.components.modal({}).shouldNotExist(1000);
|
|
18
18
|
//modal jde zavřít klikem mimo něj
|
|
19
19
|
await components_1.components.button({ text: "Click to open modal - default" }).click();
|
|
20
|
-
await components_1.components.modal({}).shouldExist();
|
|
20
|
+
await components_1.components.modal({}).shouldExist(1000);
|
|
21
21
|
await t.click("body", { offsetX: 0, offsetY: 0 });
|
|
22
|
-
await components_1.components.modal({}).shouldNotExist();
|
|
22
|
+
await components_1.components.modal({}).shouldNotExist(1000);
|
|
23
23
|
});
|
|
@@ -13,13 +13,13 @@ const wait_for_react_1 = require("../utils/wait-for-react");
|
|
|
13
13
|
(0, testcafe_1.test)("Multi combobox", async () => {
|
|
14
14
|
//TODO- dodělat, až bude správná classa na všech comboboxech a data-name u všech comboboxů
|
|
15
15
|
const defaultMultiCombobox = components_1.components.multiCombobox({ dataName: "multi-combobox" });
|
|
16
|
-
await defaultMultiCombobox.shouldExist();
|
|
17
|
-
await defaultMultiCombobox.selectItemFromDropdown("Option red");
|
|
16
|
+
await defaultMultiCombobox.shouldExist(1000);
|
|
17
|
+
await defaultMultiCombobox.selectItemFromDropdown("Option red", 1000);
|
|
18
18
|
await defaultMultiCombobox.replace("Option green");
|
|
19
|
-
await defaultMultiCombobox.selectItemByTypeText("Option four");
|
|
20
|
-
await defaultMultiCombobox.shouldHaveValue("Option red");
|
|
21
|
-
await defaultMultiCombobox.shouldHaveValue("Option four");
|
|
22
|
-
await defaultMultiCombobox.shouldHaveValue("Option green");
|
|
23
|
-
await components_1.components.multiCombobox({ dataName: "multi-combobox-disabled" }).shouldBeDisabled();
|
|
24
|
-
await components_1.components.multiCombobox({ dataName: "multi-combobox-invalid" }).shouldBeInvalid();
|
|
19
|
+
await defaultMultiCombobox.selectItemByTypeText("Option four", 1000);
|
|
20
|
+
await defaultMultiCombobox.shouldHaveValue("Option red", 1000);
|
|
21
|
+
await defaultMultiCombobox.shouldHaveValue("Option four", 1000);
|
|
22
|
+
await defaultMultiCombobox.shouldHaveValue("Option green", 1000);
|
|
23
|
+
await components_1.components.multiCombobox({ dataName: "multi-combobox-disabled" }).shouldBeDisabled(1000);
|
|
24
|
+
await components_1.components.multiCombobox({ dataName: "multi-combobox-invalid" }).shouldBeInvalid(1000);
|
|
25
25
|
});
|
package/ui/combobox.d.ts
CHANGED
|
@@ -4,15 +4,15 @@ interface ComboboxFinder extends BaseFinder {
|
|
|
4
4
|
nth?: number;
|
|
5
5
|
}
|
|
6
6
|
export declare function combobox(finder: ComboboxFinder): {
|
|
7
|
-
typeTextAndSelectItemByIndex(optionText: string, index?: number): TestControllerPromise<any>;
|
|
8
|
-
selectItemWithTextFromDropdown(optionText: string): TestControllerPromise<any>;
|
|
9
|
-
shouldExist(): TestControllerPromise<any>;
|
|
10
|
-
shouldHaveValue(value: string): TestControllerPromise<any>;
|
|
11
|
-
shouldBeEmpty(): TestControllerPromise<any>;
|
|
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
12
|
replace(optionText: string, index?: number): TestControllerPromise<any>;
|
|
13
|
-
shouldBeDisabled(): TestControllerPromise<any>;
|
|
14
|
-
shouldNotBeDisabled(): TestControllerPromise<any>;
|
|
15
|
-
shouldBeInvalid(): TestControllerPromise<any>;
|
|
13
|
+
shouldBeDisabled(timeout?: number): TestControllerPromise<any>;
|
|
14
|
+
shouldNotBeDisabled(timeout?: number): TestControllerPromise<any>;
|
|
15
|
+
shouldBeInvalid(timeout?: number): TestControllerPromise<any>;
|
|
16
16
|
shouldShowInvalidText(errorText: string): TestControllerPromise<any>;
|
|
17
17
|
shouldBeRequired(): TestControllerPromise<any>;
|
|
18
18
|
};
|
package/ui/combobox.js
CHANGED
|
@@ -11,36 +11,42 @@ function combobox(finder) {
|
|
|
11
11
|
.nth((_a = finder.nth) !== null && _a !== void 0 ? _a : 0)
|
|
12
12
|
.find(".uxf-form-component__input");
|
|
13
13
|
return {
|
|
14
|
-
typeTextAndSelectItemByIndex(optionText, index = 0) {
|
|
15
|
-
return testcafe_1.t
|
|
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));
|
|
16
20
|
},
|
|
17
|
-
selectItemWithTextFromDropdown(optionText) {
|
|
21
|
+
selectItemWithTextFromDropdown(optionText, timeout = 0) {
|
|
18
22
|
return testcafe_1.t
|
|
19
23
|
.click(comboboxSelector.find(".uxf-input__arrow-icon"))
|
|
24
|
+
.expect((0, testcafe_1.Selector)(".uxf-dropdown__item").withText(optionText).exists)
|
|
25
|
+
.ok({ timeout })
|
|
20
26
|
.click((0, testcafe_1.Selector)(".uxf-dropdown__item").withText(optionText));
|
|
21
27
|
},
|
|
22
|
-
shouldExist() {
|
|
23
|
-
return testcafe_1.t.expect(comboboxSelector.exists).ok();
|
|
28
|
+
shouldExist(timeout = 0) {
|
|
29
|
+
return testcafe_1.t.expect(comboboxSelector.exists).ok({ timeout });
|
|
24
30
|
},
|
|
25
|
-
shouldHaveValue(value) {
|
|
26
|
-
return testcafe_1.t.expect(comboboxSelector.find("input").value).eql(value);
|
|
31
|
+
shouldHaveValue(value, timeout = 0) {
|
|
32
|
+
return testcafe_1.t.expect(comboboxSelector.find("input").value).eql(value, { timeout });
|
|
27
33
|
},
|
|
28
|
-
shouldBeEmpty() {
|
|
29
|
-
return testcafe_1.t.expect(comboboxSelector.find("input").value).eql("");
|
|
34
|
+
shouldBeEmpty(timeout = 0) {
|
|
35
|
+
return testcafe_1.t.expect(comboboxSelector.find("input").value).eql("", { timeout });
|
|
30
36
|
},
|
|
31
37
|
replace(optionText, index = 0) {
|
|
32
38
|
return testcafe_1.t
|
|
33
39
|
.typeText(comboboxSelector, optionText, { replace: true })
|
|
34
40
|
.click((0, testcafe_1.Selector)("li.uxf-dropdown__item").nth(index));
|
|
35
41
|
},
|
|
36
|
-
shouldBeDisabled() {
|
|
37
|
-
return testcafe_1.t.expect(comboboxSelector.find("div").hasClass("is-disabled")).ok();
|
|
42
|
+
shouldBeDisabled(timeout = 0) {
|
|
43
|
+
return testcafe_1.t.expect(comboboxSelector.find("div").hasClass("is-disabled")).ok({ timeout });
|
|
38
44
|
},
|
|
39
|
-
shouldNotBeDisabled() {
|
|
40
|
-
return testcafe_1.t.expect(comboboxSelector.find("div").hasClass("is-disabled")).notOk();
|
|
45
|
+
shouldNotBeDisabled(timeout = 0) {
|
|
46
|
+
return testcafe_1.t.expect(comboboxSelector.find("div").hasClass("is-disabled")).notOk({ timeout });
|
|
41
47
|
},
|
|
42
|
-
shouldBeInvalid() {
|
|
43
|
-
return testcafe_1.t.expect(comboboxSelector.parent().hasClass("is-invalid")).ok();
|
|
48
|
+
shouldBeInvalid(timeout = 0) {
|
|
49
|
+
return testcafe_1.t.expect(comboboxSelector.parent().hasClass("is-invalid")).ok({ timeout });
|
|
44
50
|
},
|
|
45
51
|
shouldShowInvalidText(errorText) {
|
|
46
52
|
return testcafe_1.t.expect(comboboxSelector.innerText).contains(errorText);
|
package/ui/flash-message.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseFinder } from "../utils/base-finder";
|
|
2
2
|
type FlashMessageFinder = BaseFinder;
|
|
3
3
|
export declare function flashMessage(finder?: FlashMessageFinder): {
|
|
4
|
-
shouldExists(): TestControllerPromise<any>;
|
|
5
|
-
shouldNotExists(): TestControllerPromise<any>;
|
|
6
|
-
shouldContainsText(text: string): TestControllerPromise<any>;
|
|
4
|
+
shouldExists(timeout?: number): TestControllerPromise<any>;
|
|
5
|
+
shouldNotExists(timeout?: number): TestControllerPromise<any>;
|
|
6
|
+
shouldContainsText(text: string, timeout?: number): TestControllerPromise<any>;
|
|
7
7
|
};
|
|
8
8
|
export {};
|
package/ui/flash-message.js
CHANGED
|
@@ -6,14 +6,14 @@ const create_selector_1 = require("../utils/create-selector");
|
|
|
6
6
|
function flashMessage(finder) {
|
|
7
7
|
const FlashMessageSelector = (0, create_selector_1.createSelector)(finder !== null && finder !== void 0 ? finder : {}).find(".uxf-flash-messages");
|
|
8
8
|
return {
|
|
9
|
-
shouldExists() {
|
|
10
|
-
return testcafe_1.t.expect(FlashMessageSelector.exists).ok();
|
|
9
|
+
shouldExists(timeout = 0) {
|
|
10
|
+
return testcafe_1.t.expect(FlashMessageSelector.exists).ok({ timeout });
|
|
11
11
|
},
|
|
12
|
-
shouldNotExists() {
|
|
13
|
-
return testcafe_1.t.expect(FlashMessageSelector.exists).notOk();
|
|
12
|
+
shouldNotExists(timeout = 0) {
|
|
13
|
+
return testcafe_1.t.expect(FlashMessageSelector.exists).notOk({ timeout });
|
|
14
14
|
},
|
|
15
|
-
shouldContainsText(text) {
|
|
16
|
-
return testcafe_1.t.expect(FlashMessageSelector.innerText).contains(text);
|
|
15
|
+
shouldContainsText(text, timeout = 0) {
|
|
16
|
+
return testcafe_1.t.expect(FlashMessageSelector.innerText).contains(text, { timeout });
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
19
|
}
|
package/ui/modal.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseFinder } from "../utils/base-finder";
|
|
2
2
|
export declare function modal(finder: BaseFinder): {
|
|
3
|
-
shouldExist(): TestControllerPromise<any>;
|
|
4
|
-
shouldNotExist(): TestControllerPromise<any>;
|
|
3
|
+
shouldExist(timeout?: number): TestControllerPromise<any>;
|
|
4
|
+
shouldNotExist(timeout?: number): TestControllerPromise<any>;
|
|
5
5
|
};
|
package/ui/modal.js
CHANGED
|
@@ -6,11 +6,11 @@ const create_selector_1 = require("../utils/create-selector");
|
|
|
6
6
|
function modal(finder) {
|
|
7
7
|
const modalSelector = (0, create_selector_1.createSelector)(finder).find(".uxf-dialog__body");
|
|
8
8
|
return {
|
|
9
|
-
shouldExist() {
|
|
10
|
-
return testcafe_1.t.expect(modalSelector.exists).ok();
|
|
9
|
+
shouldExist(timeout = 0) {
|
|
10
|
+
return testcafe_1.t.expect(modalSelector.exists).ok({ timeout });
|
|
11
11
|
},
|
|
12
|
-
shouldNotExist() {
|
|
13
|
-
return testcafe_1.t.expect(modalSelector.exists).notOk();
|
|
12
|
+
shouldNotExist(timeout = 0) {
|
|
13
|
+
return testcafe_1.t.expect(modalSelector.exists).notOk({ timeout });
|
|
14
14
|
},
|
|
15
15
|
};
|
|
16
16
|
}
|
package/ui/multi-combobox.d.ts
CHANGED
|
@@ -4,12 +4,12 @@ interface MultiComboboxFinder extends BaseFinder {
|
|
|
4
4
|
nth?: number;
|
|
5
5
|
}
|
|
6
6
|
export declare function multiCombobox(finder: MultiComboboxFinder): {
|
|
7
|
-
selectItemByTypeText(optionText: string, index?: number): TestControllerPromise<any>;
|
|
8
|
-
selectItemFromDropdown(optionText: string): TestControllerPromise<any>;
|
|
9
|
-
shouldExist(): TestControllerPromise<any>;
|
|
10
|
-
shouldBeDisabled(): TestControllerPromise<any>;
|
|
11
|
-
shouldBeInvalid(): TestControllerPromise<any>;
|
|
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
12
|
replace(optionText: string, index?: number): TestControllerPromise<any>;
|
|
13
|
-
shouldHaveValue(value: string): TestControllerPromise<any>;
|
|
13
|
+
shouldHaveValue(value: string, timeout?: number): TestControllerPromise<any>;
|
|
14
14
|
};
|
|
15
15
|
export {};
|
package/ui/multi-combobox.js
CHANGED
|
@@ -11,30 +11,38 @@ function multiCombobox(finder) {
|
|
|
11
11
|
.nth((_a = finder.nth) !== null && _a !== void 0 ? _a : 0)
|
|
12
12
|
.find(".uxf-multi-combobox__button");
|
|
13
13
|
return {
|
|
14
|
-
selectItemByTypeText(optionText, index = 0) {
|
|
15
|
-
return testcafe_1.t
|
|
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));
|
|
16
20
|
},
|
|
17
|
-
selectItemFromDropdown(optionText) {
|
|
18
|
-
return testcafe_1.t
|
|
21
|
+
selectItemFromDropdown(optionText, timeout = 0) {
|
|
22
|
+
return testcafe_1.t
|
|
23
|
+
.click(multiComboboxSelector)
|
|
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));
|
|
19
27
|
},
|
|
20
|
-
shouldExist() {
|
|
21
|
-
return testcafe_1.t.expect(multiComboboxSelector.exists).ok();
|
|
28
|
+
shouldExist(timeout = 0) {
|
|
29
|
+
return testcafe_1.t.expect(multiComboboxSelector.exists).ok({ timeout });
|
|
22
30
|
},
|
|
23
|
-
shouldBeDisabled() {
|
|
24
|
-
return testcafe_1.t.expect(multiComboboxSelector.hasClass("is-disabled")).ok();
|
|
31
|
+
shouldBeDisabled(timeout = 0) {
|
|
32
|
+
return testcafe_1.t.expect(multiComboboxSelector.hasClass("is-disabled")).ok({ timeout });
|
|
25
33
|
},
|
|
26
|
-
shouldBeInvalid() {
|
|
27
|
-
return testcafe_1.t.expect(multiComboboxSelector.hasClass("is-invalid")).ok();
|
|
34
|
+
shouldBeInvalid(timeout = 0) {
|
|
35
|
+
return testcafe_1.t.expect(multiComboboxSelector.hasClass("is-invalid")).ok({ timeout });
|
|
28
36
|
},
|
|
29
37
|
replace(optionText, index = 0) {
|
|
30
38
|
return testcafe_1.t
|
|
31
39
|
.typeText(multiComboboxSelector, optionText, { replace: true })
|
|
32
40
|
.click((0, testcafe_1.Selector)(".uxf-dropdown__item").nth(index));
|
|
33
41
|
},
|
|
34
|
-
shouldHaveValue(value) {
|
|
42
|
+
shouldHaveValue(value, timeout = 0) {
|
|
35
43
|
return testcafe_1.t
|
|
36
44
|
.expect(multiComboboxSelector.find(".uxf-multi-combobox__selected-options").textContent)
|
|
37
|
-
.contains(value);
|
|
45
|
+
.contains(value, { timeout });
|
|
38
46
|
},
|
|
39
47
|
};
|
|
40
48
|
}
|