webdriverio-testing-library icon indicating copy to clipboard operation
webdriverio-testing-library copied to clipboard

Create elementToNotBeVisible

Open sabrina-ciaciura opened this issue 2 years ago • 1 comments

  • Should loop through and if element is visible, keep trying again.
  • Should fail if element persists to be visible
  • Passes when promise is ultimately rejected and element is not visible

sabrina-ciaciura avatar Mar 30 '23 22:03 sabrina-ciaciura

const expectTitleNotExists = async (screen, title) => { try { await screen.findByText(title, {}, { timeout: 100 }) expect(false).toBeTruthy() } catch { expect(true).toBeTruthy() } }

sabrina-ciaciura avatar Mar 30 '23 23:03 sabrina-ciaciura