Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should expect element not to be displayed', async () => {
await waitToBeNotDisplayed(waitsPage.waitToBeNotDisplayed);
await expect(waitsPage.waitToBeNotDisplayed).not.toBeDisplayed();
});
it('waitToBeNotDisplayed should wait for an element not to be displayed', async () => {
await waitToBeNotDisplayed(waitsPage.waitToBeNotDisplayed);
await expect(waitsPage.waitToBeNotDisplayed.isDisplayed()).toBe(
false
);
});
});
it('waitToBeNotDisplayed should wait for an element not to be displayed', () => {
waitToBeNotDisplayed(waitsPage.waitToBeNotDisplayed);
expect(waitsPage.waitToBeNotDisplayed.isDisplayed()).toBe(false);
});
});
it('should not throw an error if element is not present and should handle not present the same way as not displayed', () => {
waitToBeNotDisplayed(waitsPage.waitToBeNotPresent);
expect(waitsPage.waitToBeNotPresent.isPresent()).toBe(false);
});
it('should expect element not to be present', () => {
waitToBeNotDisplayed(waitsPage.waitToBeNotPresent);
expect(waitsPage.waitToBeNotPresent).not.toBePresent();
});
it('should expect element not to be present', async () => {
await waitToBeNotDisplayed(waitsPage.waitToBeNotPresent);
await expect(waitsPage.waitToBeNotPresent).not.toBePresent();
});
it('should not throw an error if element is not present and should handle not present the same way as not displayed', async () => {
await waitToBeNotDisplayed(waitsPage.waitToBeNotPresent);
await expect(waitsPage.waitToBeNotPresent.isPresent()).toBe(false);
});
it('should expect element not to be displayed', () => {
waitToBeNotDisplayed(waitsPage.waitToBeNotDisplayed);
expect(waitsPage.waitToBeNotDisplayed).not.toBeDisplayed();
});