Skip to content

Cannot wait for system alerts 'Argument type IndexableSystemElement is not assignable to parameter type NativeElement' #4504

Open
@APrincipe21

Description

@APrincipe21

What happened?

Using the system.element(by.system.label("Allow")) method that was released two weeks ago is almost useless unless your app is built to conform to this. We login and the privacy alert is shown but there's some delay and no way to account for the delay other than a hard wait.

await waitFor(system.element(by.system.label("Allow")))
        .toBeVisible()
        .withTimeout(15000);

Above is not accepted due to 'Argument type IndexableSystemElement is not assignable to parameter type NativeElement' we should be able to call waitFor on this method since there's no way to precisely expect an iOS system alert.

What was the expected behaviour?

Ideally you would be able to wait until the alert is shown using other methods.

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version:
React Native version:
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version:
Device model:
iOS version:
macOS version:
Xcode version:
Test-runner (select one): jest / other

Detox logs

Detox logs
paste logs here!

Device logs

Device logs
paste your device.log here!

More data, please!

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions