Skip to content

use accessibility identifier for error modal #1162

@tomholub

Description

@tomholub
  checkError = async (errorText: string) => {
    const message = '-ios class chain:**/XCUIElementTypeAlert/XCUIElementTypeOther/XCUIElementTypeOther/' +
      'XCUIElementTypeOther[2]/XCUIElementTypeScrollView[1]/XCUIElementTypeOther[1]/XCUIElementTypeStaticText[2]';//it works only with this selector
    await expect(await this.errorHeader).toBeDisplayed();
    await expect(await $(message)).toHaveAttribute('value', `${errorText}`);
    await expect(await this.okButton).toBeDisplayed();
  }

I'd like this to be renamed to checkErrorModal and be moved to BaseScreen, so that it's reusable across the app.

We use the same code to render error modals everywhere, so we can use same code to check for it everywhere.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions