expect-webdriverio icon indicating copy to clipboard operation
expect-webdriverio copied to clipboard

💡[Feature]: Allow variable negation for expect

Open nextlevelbeard opened this issue 3 years ago • 3 comments

Allow variable negation, useful for Cucumber pattern:

Then(/^I should( not)? see stuff$/i, async (not?: string) => await expect(PageObj.elem)[not].toBeDisplayed())

nextlevelbeard avatar Jul 28 '22 20:07 nextlevelbeard

Is this not supported? I see usage of isNot in the matchers.

christian-bromann avatar Jul 28 '22 20:07 christian-bromann

isNot might just be for internal use. AFAIK there is no exposed way to pass a truthy/false value.

nextlevelbeard avatar Jul 28 '22 21:07 nextlevelbeard

I tested it with a latest install of WebdriverIO and everything was working as expected. Do you have a reproducible example?

christian-bromann avatar Aug 11 '22 10:08 christian-bromann

Closing due to inactivity.

christian-bromann avatar Oct 02 '22 06:10 christian-bromann