@atomic-testing/component-driver-mui-v9 0.89.0 → 0.90.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/dist/index.cjs +12 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -11
- package/dist/index.d.mts +10 -11
- package/dist/index.mjs +13 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/components/DialogDriver.ts +2 -2
- package/src/components/DrawerDriver.ts +2 -2
- package/src/components/MenuDriver.ts +2 -2
- package/src/components/OverlayDriver.ts +2 -2
- package/src/errors/MenuItemNotFoundError.ts +4 -8
package/dist/index.cjs
CHANGED
|
@@ -599,10 +599,10 @@ var DialogDriver = class extends _atomic_testing_core.ContainerDriver {
|
|
|
599
599
|
content: option?.content ?? {}
|
|
600
600
|
});
|
|
601
601
|
}
|
|
602
|
-
overriddenParentLocator() {
|
|
602
|
+
static overriddenParentLocator() {
|
|
603
603
|
return dialogRootLocator;
|
|
604
604
|
}
|
|
605
|
-
overrideLocatorRelativePosition() {
|
|
605
|
+
static overrideLocatorRelativePosition() {
|
|
606
606
|
return "Same";
|
|
607
607
|
}
|
|
608
608
|
async getTitle() {
|
|
@@ -682,8 +682,8 @@ const defaultTransitionDuration = 250;
|
|
|
682
682
|
* `closeByBackdrop`.
|
|
683
683
|
*
|
|
684
684
|
* Subclasses supply {@link getSurfaceLocator} (the element whose visibility means
|
|
685
|
-
* "open") and, when the overlay is portal-rendered, override
|
|
686
|
-
* `overriddenParentLocator()`/`overrideLocatorRelativePosition()` to re-root.
|
|
685
|
+
* "open") and, when the overlay is portal-rendered, override the static
|
|
686
|
+
* `overriddenParentLocator()`/`overrideLocatorRelativePosition()` portal hooks to re-root.
|
|
687
687
|
*
|
|
688
688
|
* `closeByEscape` is intentionally absent: keyboard dismissal needs a key-press
|
|
689
689
|
* primitive the `Interactor` interface does not yet expose, which would have to be
|
|
@@ -769,10 +769,10 @@ var DrawerDriver = class extends OverlayDriver {
|
|
|
769
769
|
content: option?.content ?? {}
|
|
770
770
|
});
|
|
771
771
|
}
|
|
772
|
-
overriddenParentLocator() {
|
|
772
|
+
static overriddenParentLocator() {
|
|
773
773
|
return drawerRootLocator;
|
|
774
774
|
}
|
|
775
|
-
overrideLocatorRelativePosition() {
|
|
775
|
+
static overrideLocatorRelativePosition() {
|
|
776
776
|
return "Same";
|
|
777
777
|
}
|
|
778
778
|
getSurfaceLocator() {
|
|
@@ -881,12 +881,12 @@ var InputDriver = class extends _atomic_testing_core.ComponentDriver {
|
|
|
881
881
|
//#endregion
|
|
882
882
|
//#region src/errors/MenuItemDisabledError.ts
|
|
883
883
|
const MenuItemDisabledErrorId = "MenuItemDisabledError";
|
|
884
|
-
function getErrorMessage
|
|
884
|
+
function getErrorMessage(label) {
|
|
885
885
|
return `The menu item with label: ${label} is disabled`;
|
|
886
886
|
}
|
|
887
887
|
var MenuItemDisabledError = class extends _atomic_testing_core.ErrorBase {
|
|
888
888
|
constructor(label, driver) {
|
|
889
|
-
super(getErrorMessage
|
|
889
|
+
super(getErrorMessage(label), driver);
|
|
890
890
|
this.label = label;
|
|
891
891
|
this.driver = driver;
|
|
892
892
|
this.name = MenuItemDisabledErrorId;
|
|
@@ -936,14 +936,10 @@ var ListDriver = class extends _atomic_testing_core.ListComponentDriver {
|
|
|
936
936
|
//#endregion
|
|
937
937
|
//#region src/errors/MenuItemNotFoundError.ts
|
|
938
938
|
const MenuItemNotFoundErrorId = "MenuItemNotFoundError";
|
|
939
|
-
|
|
940
|
-
return `Cannot find menu item with label: ${label}`;
|
|
941
|
-
}
|
|
942
|
-
var MenuItemNotFoundError = class extends _atomic_testing_core.ErrorBase {
|
|
939
|
+
var MenuItemNotFoundError = class extends _atomic_testing_core.ItemNotFoundError {
|
|
943
940
|
constructor(label, driver) {
|
|
944
|
-
super(
|
|
941
|
+
super(label, driver, `Cannot find menu item with label: ${label}`);
|
|
945
942
|
this.label = label;
|
|
946
|
-
this.driver = driver;
|
|
947
943
|
this.name = MenuItemNotFoundErrorId;
|
|
948
944
|
}
|
|
949
945
|
};
|
|
@@ -975,10 +971,10 @@ var MenuDriver = class extends _atomic_testing_core.ComponentDriver {
|
|
|
975
971
|
parts: parts$6
|
|
976
972
|
});
|
|
977
973
|
}
|
|
978
|
-
overriddenParentLocator() {
|
|
974
|
+
static overriddenParentLocator() {
|
|
979
975
|
return menuRootLocator;
|
|
980
976
|
}
|
|
981
|
-
overrideLocatorRelativePosition() {
|
|
977
|
+
static overrideLocatorRelativePosition() {
|
|
982
978
|
return "Same";
|
|
983
979
|
}
|
|
984
980
|
async getMenuItemByLabel(label) {
|