@fkui/vue 5.38.0 → 5.40.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.
@@ -263,7 +263,14 @@ var FTooltipPageObject = class {
263
263
  return cy.get(this.selector);
264
264
  }
265
265
  iButton() {
266
- return cy.get(`${this.selector} .tooltip__button`);
266
+ return cy.get(
267
+ [
268
+ /* no attached to anything */
269
+ `.tooltip__button:has(~ :is(${this.selector}))`,
270
+ /* attached to label or heading */
271
+ `.tooltip__container:has(.tooltip__button):has(~ :is(${this.selector})) > .tooltip__button`
272
+ ].join(", ")
273
+ );
267
274
  }
268
275
  header() {
269
276
  return cy.get(`${this.selector} .tooltip__header`);
@@ -281,8 +288,8 @@ var FTooltipPageObject = class {
281
288
  return {
282
289
  closeButtonTop: () => cy.get(`${this.selector} .close-button`),
283
290
  closeButtonBottom: () => cy.get(`${this.selector} .close-button`),
284
- heading: () => cy.get(`${this.selector} .tooltip__content .tooltip__header`),
285
- brodtext: () => cy.get(`${this.selector} .tooltip__content .tooltip__body`)
291
+ heading: () => cy.get(`${this.selector} .tooltip__header`),
292
+ brodtext: () => cy.get(`${this.selector} .tooltip__body`)
286
293
  };
287
294
  }
288
295
  };
@@ -854,27 +861,26 @@ var FFormModalPageObject = class extends FModalPageObject {
854
861
  }
855
862
  };
856
863
 
857
- // src/pageobject/IMenu.pageobject.ts
858
- var IMenuPageObject = class {
864
+ // src/pageobject/IPopupMenu.pageobject.ts
865
+ var IPopupMenuPageObject = class {
859
866
  el() {
860
867
  return cy.get(this.selector);
861
868
  }
862
869
  /**
863
- * @param selector - the root of the IMenu, usually `<nav class="imenu">...</nav>`.
870
+ * @param selector - the root of the IPopupMenu, usually `<nav class="IPopupMenu">...</nav>`.
864
871
  */
865
872
  constructor(selector) {
866
873
  this.selector = selector;
867
874
  }
868
875
  /**
869
- * Get all items in the IMenu
870
- *
876
+ * Get all items in the IPopupMenu
871
877
  * @returns all items
872
878
  */
873
879
  items() {
874
- return cy.get(`${this.selector} .imenu__list__item`);
880
+ return cy.get(`${this.selector} .ipopupmenu__list__item`);
875
881
  }
876
882
  /**
877
- * Get the item at position index in the IMenu
883
+ * Get the item at position index in the IPopupMenu
878
884
  *
879
885
  * @param index - the position index in the item array
880
886
  * @returns Menu item with given index
@@ -889,7 +895,9 @@ var IMenuPageObject = class {
889
895
  * @returns link with given index
890
896
  */
891
897
  getItemLink(index) {
892
- return cy.get(`${this.selector} .imenu__list__item a:nth(${index})`);
898
+ return cy.get(
899
+ `${this.selector} .ipopupmenu__list__item a:nth(${index})`
900
+ );
893
901
  }
894
902
  /**
895
903
  * Get currently selected menu item
@@ -898,80 +906,149 @@ var IMenuPageObject = class {
898
906
  */
899
907
  getSelectedItem() {
900
908
  return this.items().get(
901
- `${this.selector} .imenu__list__item--highlight`
909
+ `${this.selector} .ipopupmenu__list__item--highlight`
902
910
  );
903
911
  }
904
912
  };
905
913
 
906
- // src/pageobject/IPopupMenu.pageobject.ts
907
- var IPopupMenuPageObject = class {
908
- el() {
909
- return cy.get(this.selector);
910
- }
914
+ // src/pageobject/FNavigationMenu/IMenu.pageobject.ts
915
+ var IMenuPageObject = class {
911
916
  /**
912
- * @param selector - the root of the IPopupMenu, usually `<nav class="IPopupMenu">...</nav>`.
917
+ * @param selector - the root of the IMenu, usually `<nav class="imenu">...</nav>`.
913
918
  */
914
- constructor(selector) {
919
+ constructor(selector = ".imenu") {
915
920
  this.selector = selector;
916
921
  }
922
+ el() {
923
+ return cy.get(this.selector);
924
+ }
917
925
  /**
918
- * Get all items in the IPopupMenu
919
- * @returns all items
926
+ * Get all visible items in the IMenu, including popup item.
927
+ *
928
+ * @deprecated Use `FNavigationMenuPageobject.items()` instead.
929
+ * @returns All visible items.
920
930
  */
921
931
  items() {
922
- return cy.get(`${this.selector} .ipopupmenu__list__item`);
932
+ return cy.get(
933
+ `${this.selector} .imenu__list__item:not(.imenu__list__item--hidden)`
934
+ );
923
935
  }
924
936
  /**
925
- * Get the item at position index in the IPopupMenu
937
+ * Get the visible item at position index in the IMenu, including popup item.
926
938
  *
927
- * @param index - the position index in the item array
928
- * @returns Menu item with given index
939
+ * @deprecated Use `FNavigationMenuPageobject.item()` instead.
940
+ * @param index - the position index in the item array.
941
+ * @returns Menu item with given index.
929
942
  */
930
943
  item(index) {
931
944
  return this.items().eq(index);
932
945
  }
933
946
  /**
934
- * Get link for item at index
947
+ * Get link for visible item at index, including popup item.
935
948
  *
936
- * @param index - the position index in the item array
937
- * @returns link with given index
949
+ * @deprecated Use `FNavigationMenuPageobject.itemLink()` instead.
950
+ * @param index - the position index in the item array.
951
+ * @returns link with given index.
938
952
  */
939
953
  getItemLink(index) {
940
954
  return cy.get(
941
- `${this.selector} .ipopupmenu__list__item a:nth(${index})`
955
+ `${this.selector} .imenu__list__item:not(.imenu__list__item--hidden) a:nth(${index})`
942
956
  );
943
957
  }
944
958
  /**
945
- * Get currently selected menu item
959
+ * Get currently selected menu item.
946
960
  *
947
- * @returns Currently selected item
961
+ * @deprecated Use `FNavigationMenuPageobject.selectedItem()` instead.
962
+ * @returns Currently selected item.
948
963
  */
949
964
  getSelectedItem() {
950
965
  return this.items().get(
951
- `${this.selector} .ipopupmenu__list__item--highlight`
966
+ `${this.selector} .imenu__list__item--highlight`
952
967
  );
953
968
  }
954
969
  };
955
970
 
956
971
  // src/pageobject/FNavigationMenu/FNavigationMenu.pageobject.ts
957
972
  var FNavigationMenuPageobject = class {
973
+ /**
974
+ * @param selector - the root of the navigation menu, usually `.imenu`.
975
+ */
976
+ constructor(selector = ".imenu") {
977
+ this.selector = selector;
978
+ }
958
979
  el() {
959
980
  return cy.get(this.selector);
960
981
  }
961
982
  /**
962
- * @param selector - the root of the navigation menu, usually `div > nav.imenu`.
983
+ * Get all visible items in the menu, including the popup menu item.
984
+ *
985
+ * @returns All visible menu items.
963
986
  */
964
- constructor(selector) {
965
- this.selector = selector;
987
+ items() {
988
+ return cy.get(
989
+ `${this.selector} .imenu__list__item:not(.imenu__list__item--hidden)`
990
+ );
966
991
  }
967
- menu() {
968
- return new IMenuPageObject(`${this.selector}.imenu > ul.imenu__list`);
992
+ /**
993
+ * Get all overflowed (hidden) items in the menu.
994
+ *
995
+ * @returns All overflowed menu items.
996
+ */
997
+ overflowItems() {
998
+ return cy.get(`${this.selector} .imenu__list__item--hidden`);
969
999
  }
970
- popupMenu() {
971
- return new IPopupMenuPageObject(
972
- `${this.selector}.ipopupmenu > ul.ipopupmenu__list`
1000
+ /**
1001
+ * Get the visible item at position index in the menu, including popup item.
1002
+ *
1003
+ * @param index - the position index in the item array.
1004
+ * @returns Menu item with given index.
1005
+ */
1006
+ item(index) {
1007
+ return this.items().eq(index);
1008
+ }
1009
+ /**
1010
+ * Get link for visible item at given index, including popup item.
1011
+ *
1012
+ * @param index - the position index in the item array.
1013
+ * @returns link with given index.
1014
+ */
1015
+ itemLink(index) {
1016
+ return cy.get(
1017
+ `${this.selector} .imenu__list__item:not(.imenu__list__item--hidden) a:nth(${index})`
973
1018
  );
974
1019
  }
1020
+ /**
1021
+ * Get currently selected menu item.
1022
+ *
1023
+ * @returns Currently selected item.
1024
+ */
1025
+ selectedItem() {
1026
+ return this.items().get(
1027
+ `${this.selector} .imenu__list__item--highlight`
1028
+ );
1029
+ }
1030
+ /**
1031
+ * Get the menu item that open the popup menu.
1032
+ *
1033
+ * @returns The popup menu item.
1034
+ */
1035
+ popupItem() {
1036
+ return this.items().get(`${this.selector} .imenu__popup-item__wrapper`);
1037
+ }
1038
+ /**
1039
+ * Returns `IPopupMenu` page object.
1040
+ */
1041
+ popupMenu() {
1042
+ return new IPopupMenuPageObject(`.ipopupmenu > ul.ipopupmenu__list`);
1043
+ }
1044
+ /**
1045
+ * Returns `IMenu` page object.
1046
+ *
1047
+ * @deprecated `IMenuPageObject` is deprecated and equivalent methods are available for `FNavigationMenuPageobject`.
1048
+ */
1049
+ menu() {
1050
+ return new IMenuPageObject(`${this.selector}.imenu`);
1051
+ }
975
1052
  };
976
1053
 
977
1054
  // src/pageobject/FOffline.pageobject.ts