Class: SnackbarDriver
@atomic-testing/component-driver-mui-v5.SnackbarDriver
Driver for Material UI v5 Snackbar component.
See
https://mui.com/material-ui/react-snackbar/
Hierarchy
-
ComponentDriver
<typeofparts
>↳
SnackbarDriver
Constructors
constructor
• new SnackbarDriver(locator
, interactor
, option?
): SnackbarDriver
Parameters
Name | Type |
---|---|
locator | PartLocator |
interactor | Interactor |
option? | Partial <IComponentDriverOption <>> |
Returns
Overrides
ComponentDriver<typeof parts>.constructor
Defined in
packages/component-driver-mui-v5/src/components/SnackbarDriver.ts:29
Properties
commutableOption
• Readonly
commutableOption: IComponentDriverOption
<{ actionArea
: { driver
: typeof HTMLElementDriver
= HTMLElementDriver; locator
: CssLocator
} ; contentDisplay
: { driver
: typeof HTMLElementDriver
= HTMLElementDriver; locator
: CssLocator
} }>
Option passed to the constructor includes both universal options which can be shared across all component driver tree, and component specific options which are only applicable to the component.
Commutable option is the option that can be shared across all component driver tree.
Inherited from
ComponentDriver.commutableOption
Defined in
packages/core/build/src/drivers/ComponentDriver.d.ts:19
interactor
• Readonly
interactor: Interactor
Inherited from
ComponentDriver.interactor
Defined in
packages/core/build/src/drivers/ComponentDriver.d.ts:10
Accessors
driverName
• get
driverName(): string
Returns
string
Overrides
ComponentDriver.driverName
Defined in
packages/component-driver-mui-v5/src/components/SnackbarDriver.ts:65
locator
• get
locator(): PartLocator
Return the locator of the component
Returns
PartLocator
Inherited from
ComponentDriver.locator
Defined in
packages/core/build/src/drivers/ComponentDriver.d.ts:50
parts
• get
parts(): ScenePartDriver
<T
>
Return driver instance of all the named parts
Returns
ScenePartDriver
<T
>
Inherited from
ComponentDriver.parts
Defined in
packages/core/build/src/drivers/ComponentDriver.d.ts:46
Methods
click
▸ click(option?
): Promise
<void
>
Parameters
Name | Type |
---|---|
option? | Partial <ClickOption > |
Returns
Promise
<void
>
Inherited from
ComponentDriver.click
Defined in
packages/core/build/src/drivers/ComponentDriver.d.ts:74
enforcePartExistence
▸ enforcePartExistence(partName
): Promise
<void
>
Check the specified parts' existences, and throw MissPartError if any of the part is found not existence. Existence is defined by the part's existence in the DOM regardless of its visibility on the screen
Parameters
Name | Type | Description |
---|---|---|
partName | "contentDisplay" | "actionArea" | readonly ("contentDisplay" | "actionArea" )[] | Single or array of the names of the parts to be enforced |
Returns
Promise
<void
>
Inherited from
ComponentDriver.enforcePartExistence
Defined in
packages/core/build/src/drivers/ComponentDriver.d.ts:56
exists
▸ exists(): Promise
<boolean
>
Whether the component exists/attached to the DOM
Returns
Promise
<boolean
>
true if the component is attached to the DOM, false otherwise
Inherited from
ComponentDriver.exists
Defined in
packages/core/build/src/drivers/ComponentDriver.d.ts:73
focus
▸ focus(option?
): Promise
<void
>
Parameters
Name | Type |
---|---|
option? | Partial <FocusOption > |