You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By far, Most of the time you want to make sure that an assertion is eventually true over the timeout period. In other words, it can fail any number of time up until the timeout, but the moment it passes, the entire assertion is considered to pass.
convergent assertion profile
|--- timeout ------|
(pass) F -> F -> F -> T
(pass) F-> T
(pass) T
(fail) F -> F -> F -> F -> F
However, we have encountered some cases where you want to assert some invariant is true over the course of time. For example, that a button remains enabled and visible. There is no way to do this currently with interactors.
The feature request is to add assertion methods to ensure that something is true and remains true for a certain period.
invariant assertion profile
This is the boolean inverse of the convergent assertion profile.
|--- timeout ------|
(fail) T -> T -> T -> F
(fail) T-> F
(fail) F
(pass) T -> T -> T -> T -> T
Two proposals
new assertion methods
Corresponding to each assertion method there is an equivalent "invariant" method which has the invariant assertion profile:
By far, Most of the time you want to make sure that an assertion is eventually true over the timeout period. In other words, it can fail any number of time up until the timeout, but the moment it passes, the entire assertion is considered to pass.
convergent assertion profile
However, we have encountered some cases where you want to assert some invariant is true over the course of time. For example, that a button remains enabled and visible. There is no way to do this currently with interactors.
The feature request is to add assertion methods to ensure that something is true and remains true for a certain period.
invariant assertion profile
This is the boolean inverse of the convergent assertion profile.
Two proposals
new assertion methods
Corresponding to each assertion method there is an equivalent "invariant" method which has the invariant assertion profile:
is()
remains()
has()
retains()
so to use the button as an example:
assertion modifier
Another possibility is just add a "modifier" to assertions to make them invariant:
That seems to be simple, and would also be easier to bolt on to things like
exists()
andabsent()
Context
Here is an example of an invariant assertion in the wild that cannot be migrated to interactors https://github.com/folio-org/stripes-core/blob/dc3bd495e00c69737bc145f36c9a2780ed31ba7e/test/bigtest/tests/login-test.js#L80-L82
The text was updated successfully, but these errors were encountered: