Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('waitToBeDisplayed should wait for an element to be displayed', async () => {
await waitToBeDisplayed(waitsPage.waitToBeDisplayed);
await expect(waitsPage.waitToBeDisplayed.isDisplayed()).toBe(true);
});
it('click should click on the button', async () => {
await click(actionsPage.clickBtn);
await waitToBeDisplayed(actionsPage.clickResult);
await expect(actionsPage.clickResult.isDisplayed()).toBe(true);
});
it('hover should hover on the button', () => {
hover(actionsPage.hoverBtn);
waitToBeDisplayed(actionsPage.hoverResult);
expect(actionsPage.hoverResult.isDisplayed()).toBe(true);
});
it('waitToBeDisplayed should wait for an element to be displayed', () => {
waitToBeDisplayed(waitsPage.waitToBeDisplayed);
expect(waitsPage.waitToBeDisplayed.isDisplayed()).toBe(true);
});
it('hover should hover on the button', async () => {
await hover(actionsPage.hoverBtn);
await waitToBeDisplayed(actionsPage.hoverResult);
await expect(actionsPage.hoverResult.isDisplayed()).toBe(true);
});
it('should expect element to be displayed', () => {
waitToBeDisplayed(waitsPage.waitToBeDisplayed);
expect(waitsPage.waitToBeDisplayed).toBeDisplayed();
});
});
it('should expect element to be present when it is displayed', async () => {
await waitToBeDisplayed(waitsPage.waitToBeDisplayed);
await expect(waitsPage.waitToBeDisplayed).toBePresent();
});
it('click should click on the button', () => {
click(actionsPage.clickBtn);
waitToBeDisplayed(actionsPage.clickResult);
expect(actionsPage.clickResult.isDisplayed()).toBe(true);
});