I'm beginner for testing frontend. This is why thank you for your all suggestions. My question and problem is when i tested other page , i think i need to check beforeEach : login is success or not
. But i do not have any clue for this issue . If someone help me , i will be so grateful.
const { expect } = require(‘chai’);
const {
getBaseUrl,
getNewPage,
closeBrowsers,
} = require(‘./_helpers’);
describe(‘Flow’, function(){
this.timeout(0);
beforeEach(function(){
});
it(‘Create flow modal’, async() => {
const page = await getNewPage();
await page.goto(getBaseUrl() + ‘/flows’);
await page.waitForSelector(‘[class*=create-flow]’, { timeout: 60 * 1000 });
const CreateFlowButton = await page.$(‘button[type=submit]’);
expect(!!!CreateFlowButton).to.be.true;
});
Aucun commentaire:
Enregistrer un commentaire