Skip to main content

Class: MenuItemDisabledError

Defined in: packages/component-driver-angular-material-v20/src/errors/MenuItemDisabledError.ts:12

Thrown when clicking a disabled menu item or option. A real user's click on a disabled item is silently ignored by Material, so a test that reaches one almost certainly holds a wrong assumption — fail loudly instead of letting the test time out waiting for a selection that never happens. Mirrors the mui-v7 error of the same name.

Extends​

  • ErrorBase

Constructors​

Constructor​

new MenuItemDisabledError(label, driver): MenuItemDisabledError

Defined in: packages/component-driver-angular-material-v20/src/errors/MenuItemDisabledError.ts:13

Parameters​

label​

string

driver​

ComponentDriver<any>

Returns​

MenuItemDisabledError

Overrides​

ErrorBase.constructor

Properties​

driver​

readonly driver: ComponentDriver<any>

Defined in: packages/component-driver-angular-material-v20/src/errors/MenuItemDisabledError.ts:15


label​

readonly label: string

Defined in: packages/component-driver-angular-material-v20/src/errors/MenuItemDisabledError.ts:14

Inherited members (6)

Properties​

cause?​

optional cause?: unknown

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24

Inherited from​

ErrorBase.cause


driverName​

readonly driverName: string

Defined in: packages/core/dist/index.d.mts:1595

Inherited from​

ErrorBase.driverName


message​

message: string

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075

Inherited from​

ErrorBase.message


name​

name: string

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074

Inherited from​

ErrorBase.name


stack?​

optional stack?: string

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from​

ErrorBase.stack

Methods​

isError()​

static isError(error): error is Error

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.error.d.ts:21

Indicates whether the argument provided is a built-in Error instance or not.

Parameters​
error​

unknown

Returns​

error is Error

Inherited from​

ErrorBase.isError