Skip to content

Cautious command mutation settings are causing delays #3117

@Fishbowler

Description

@Fishbowler

Is there an existing issue for this?

  • I have searched the existing issues and didn't find mine.

Steps to reproduce

A check like assertNotVisible doesn't complete immediately, else we'd get lots of false passes when it follows a tap and no elements are visible whilst the screen is transitioning.

The algorithm waits for a maximum of 7 seconds, adjusted for time since the hierarchy likely last changed. That's not tracked in real time because that'd be really slow on the device. Instead, each command is annotated as "mutating" or not. A mutating command is one that likely alters the screen's element hierarchy.

Launching and stopping apps, taps and swipes and inputting text would naturally cause changes to the screen.

Other commands like AssertVisible or TakeScreenshot naturally don't.

Some are marked as mutating, and possibly shouldn't be, like copyTextFrom or evalScript.

Actual results

Commands like assertNotVisible take longer than they should

Expected results

Tests to be as quick as possible, whilst remaining solid and stable.

About app

n/a

About environment

n/a

Logs

n/a

Maestro version

2.3.0

How did you install Maestro?

install script (https://get.maestro.mobile.dev)

Anything else?

Check each command, and assess whether it might incorrectly be set to mutating when it really isn't.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingmaestro cliRelated to the command-line Maestro tool

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions