@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomic-testing/component-driver-mui-v9",
3
- "version": "0.89.0",
3
+ "version": "0.90.0",
4
4
  "description": "Component driver for Material-UI v9",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,10 +28,10 @@
28
28
  "@emotion/react": "^11.14.0",
29
29
  "@emotion/styled": "^11.14.1",
30
30
  "@mui/material": "^9.0.0",
31
- "@atomic-testing/component-driver-html": "0.89.0",
32
- "@atomic-testing/core": "0.89.0",
33
- "@atomic-testing/react-18": "0.89.0",
34
- "@atomic-testing/dom-core": "0.89.0"
31
+ "@atomic-testing/core": "0.90.0",
32
+ "@atomic-testing/dom-core": "0.90.0",
33
+ "@atomic-testing/react-18": "0.90.0",
34
+ "@atomic-testing/component-driver-html": "0.90.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/react": ">=18.0.0",
@@ -35,11 +35,11 @@ export class DialogDriver<ContentT extends ScenePart> extends ContainerDriver<Co
35
35
  });
36
36
  }
37
37
 
38
- override overriddenParentLocator(): Optional<PartLocator> {
38
+ static override overriddenParentLocator(): Optional<PartLocator> {
39
39
  return dialogRootLocator;
40
40
  }
41
41
 
42
- override overrideLocatorRelativePosition(): Optional<LocatorRelativePosition> {
42
+ static override overrideLocatorRelativePosition(): Optional<LocatorRelativePosition> {
43
43
  return 'Same';
44
44
  }
45
45
 
@@ -52,11 +52,11 @@ export class DrawerDriver<ContentT extends ScenePart> extends OverlayDriver<Cont
52
52
  });
53
53
  }
54
54
 
55
- override overriddenParentLocator(): Optional<PartLocator> {
55
+ static override overriddenParentLocator(): Optional<PartLocator> {
56
56
  return drawerRootLocator;
57
57
  }
58
58
 
59
- override overrideLocatorRelativePosition(): Optional<LocatorRelativePosition> {
59
+ static override overrideLocatorRelativePosition(): Optional<LocatorRelativePosition> {
60
60
  return 'Same';
61
61
  }
62
62
 
@@ -32,11 +32,11 @@ export class MenuDriver extends ComponentDriver<typeof parts> {
32
32
  });
33
33
  }
34
34
 
35
- override overriddenParentLocator(): Optional<PartLocator> {
35
+ static override overriddenParentLocator(): Optional<PartLocator> {
36
36
  return menuRootLocator;
37
37
  }
38
38
 
39
- override overrideLocatorRelativePosition(): Optional<LocatorRelativePosition> {
39
+ static override overrideLocatorRelativePosition(): Optional<LocatorRelativePosition> {
40
40
  return 'Same';
41
41
  }
42
42
 
@@ -11,8 +11,8 @@ const defaultTransitionDuration = 250;
11
11
  * `closeByBackdrop`.
12
12
  *
13
13
  * Subclasses supply {@link getSurfaceLocator} (the element whose visibility means
14
- * "open") and, when the overlay is portal-rendered, override
15
- * `overriddenParentLocator()`/`overrideLocatorRelativePosition()` to re-root.
14
+ * "open") and, when the overlay is portal-rendered, override the static
15
+ * `overriddenParentLocator()`/`overrideLocatorRelativePosition()` portal hooks to re-root.
16
16
  *
17
17
  * `closeByEscape` is intentionally absent: keyboard dismissal needs a key-press
18
18
  * primitive the `Interactor` interface does not yet expose, which would have to be
@@ -1,17 +1,13 @@
1
- import { ComponentDriver, ErrorBase } from '@atomic-testing/core';
1
+ import { ComponentDriver, ItemNotFoundError } from '@atomic-testing/core';
2
2
 
3
3
  export const MenuItemNotFoundErrorId = 'MenuItemNotFoundError';
4
4
 
5
- function getErrorMessage(label: string): string {
6
- return `Cannot find menu item with label: ${label}`;
7
- }
8
-
9
- export class MenuItemNotFoundError extends ErrorBase {
5
+ export class MenuItemNotFoundError extends ItemNotFoundError {
10
6
  constructor(
11
7
  public readonly label: string,
12
- public readonly driver: ComponentDriver<any>
8
+ driver: ComponentDriver<any>
13
9
  ) {
14
- super(getErrorMessage(label), driver);
10
+ super(label, driver, `Cannot find menu item with label: ${label}`);
15
11
  this.name = MenuItemNotFoundErrorId;
16
12
  }
17
13
  }