Is your feature request related to a problem? Please describe.
The notContains method of GeneralAssertionBuilder calls CONTAINSAssertionComparison inside. Here is a permalink to the line of code.
This results, for example, in this unexpected behavior:
I call AssertionBuilder.textBody().contains('avatar') and AssertionBuilder.textBody().notContains('avatar')Expected behavior: I see both of these assertion results when I run the check.
Actual behavior: I see only the first assertion (as they are merged into one, I think).
Here is a screenshot, I've also added one more assertion after the mentioned two so you can see it really skips the middle one:
And here is what the same code results into when I change the culprit line in @checkly/cli to the proposed one:
Describe the solution you'd like
The notContains method should call NOT_CONTAINSAssertionComparison inside it, as follows:
@MikulasMascautanu thank you again for tracking down this bug and fixing it! Your PR is now released in checkly@4.0.5. Just a heads up, we recently moved the NPM package from @checkly/cli to checkly.
Is your feature request related to a problem? Please describe. The
notContains
method ofGeneralAssertionBuilder
callsCONTAINS
AssertionComparison
inside. Here is a permalink to the line of code.This results, for example, in this unexpected behavior:
AssertionBuilder.textBody().contains('avatar')
andAssertionBuilder.textBody().notContains('avatar')
Expected behavior: I see both of these assertion results when I run the check. Actual behavior: I see only the first assertion (as they are merged into one, I think). Here is a screenshot, I've also added one more assertion after the mentioned two so you can see it really skips the middle one: And here is what the same code results into when I change the culprit line in@checkly/cli
to the proposed one:Describe the solution you'd like The
notContains
method should callNOT_CONTAINS
AssertionComparison
inside it, as follows: