@uxf/e2e 11.15.3 → 11.17.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/components.d.ts CHANGED
@@ -7,6 +7,7 @@ import { combobox } from "./ui/combobox";
7
7
  import { datePickerInput } from "./ui/date-picker-input";
8
8
  import { datetimePickerInput } from "./ui/datetime-picker-input";
9
9
  import { dropzone } from "./ui/dropzone";
10
+ import { flashMessage } from "./ui/flash-message";
10
11
  import { input } from "./ui/input";
11
12
  import { message } from "./ui/message";
12
13
  import { modal } from "./ui/modal";
@@ -33,4 +34,5 @@ export declare const components: {
33
34
  radioGroup: typeof radioGroup;
34
35
  textLink: typeof textLink;
35
36
  dropzone: typeof dropzone;
37
+ flashMessage: typeof flashMessage;
36
38
  };
package/components.js CHANGED
@@ -10,6 +10,7 @@ const combobox_1 = require("./ui/combobox");
10
10
  const date_picker_input_1 = require("./ui/date-picker-input");
11
11
  const datetime_picker_input_1 = require("./ui/datetime-picker-input");
12
12
  const dropzone_1 = require("./ui/dropzone");
13
+ const flash_message_1 = require("./ui/flash-message");
13
14
  const input_1 = require("./ui/input");
14
15
  const message_1 = require("./ui/message");
15
16
  const modal_1 = require("./ui/modal");
@@ -36,4 +37,5 @@ exports.components = {
36
37
  radioGroup: radio_group_1.radioGroup,
37
38
  textLink: text_link_1.textLink,
38
39
  dropzone: dropzone_1.dropzone,
40
+ flashMessage: flash_message_1.flashMessage,
39
41
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/e2e",
3
- "version": "11.15.3",
3
+ "version": "11.17.0",
4
4
  "description": "UXF TestCafe helpers",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const testcafe_1 = require("testcafe");
4
+ const button_1 = require("../ui/button");
5
+ const flash_message_1 = require("../ui/flash-message");
6
+ const wait_for_react_1 = require("../utils/wait-for-react");
7
+ (0, testcafe_1.fixture)("Flash message")
8
+ .page("https://fe.uxf.dev/examples/ui/flash-messages/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)("Flash message", async () => {
14
+ await (0, flash_message_1.flashMessage)().shouldNotExists();
15
+ await (0, button_1.button)({ text: "Click to fire Flash message, variant success" }).click();
16
+ await (0, flash_message_1.flashMessage)().shouldExists();
17
+ await (0, flash_message_1.flashMessage)().shouldContainsText("Everything is alright.");
18
+ });
@@ -0,0 +1,9 @@
1
+ import { BaseFinder } from "../utils/base-finder";
2
+ interface FlashMessageFinder extends BaseFinder {
3
+ }
4
+ export declare function flashMessage(finder?: FlashMessageFinder): {
5
+ shouldExists(): TestControllerPromise<any>;
6
+ shouldNotExists(): TestControllerPromise<any>;
7
+ shouldContainsText(text: string): TestControllerPromise<any>;
8
+ };
9
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.flashMessage = void 0;
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() {
10
+ return testcafe_1.t.expect(FlashMessageSelector.exists).ok();
11
+ },
12
+ shouldNotExists() {
13
+ return testcafe_1.t.expect(FlashMessageSelector.exists).notOk();
14
+ },
15
+ shouldContainsText(text) {
16
+ return testcafe_1.t.expect(FlashMessageSelector.innerText).contains(text);
17
+ },
18
+ };
19
+ }
20
+ exports.flashMessage = flashMessage;