Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('waitToBePresent should wait for an element to be present', () => {
waitToBePresent(waitsPage.waitToBePresent);
expect(waitsPage.waitToBePresent.isPresent()).toBe(true);
});
it('should expect element not to be displayed when it is only present', async () => {
await waitToBePresent(waitsPage.waitToBePresent);
await expect(waitsPage.waitToBePresent).not.toBeDisplayed();
});
it('waitToBePresent should wait for an element to be present', async () => {
await waitToBePresent(waitsPage.waitToBePresent);
await expect(waitsPage.waitToBePresent.isPresent()).toBe(true);
});
it('should expect element not to displayed be when it is only present', () => {
waitToBePresent(waitsPage.waitToBePresent);
expect(waitsPage.waitToBePresent).not.toBeDisplayed();
});