Skip to content

Instantly share code, notes, and snippets.

@santaclauze
Created August 5, 2019 21:36
Show Gist options
  • Save santaclauze/b5019b1b9e4aa8c3b44e8774185c196f to your computer and use it in GitHub Desktop.
Save santaclauze/b5019b1b9e4aa8c3b44e8774185c196f to your computer and use it in GitHub Desktop.
test
it('redirects me to order process after selecting a product', async () => {
const productSelectButton = `button#select-product-${classic.id}`;
await page.waitForSelector(productSelectButton);
await expect(page).toMatchElement(productSelectButton, { text: 'Select Product' });
await expect(page).toClick(productSelectButton, { text: 'Select Product' });
await clickOnMatchingButton('Order Now');
await page.waitFor(TIME_OUT);
await expect(page.url()).toMatch(orderWithId);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment