Fix agenda create event component

This commit is contained in:
Peter Maquiran
2021-07-14 14:29:03 +01:00
parent 5614fc38fd
commit 8c859834aa
4 changed files with 47 additions and 50 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ describe('Puppeteer tests', () => {
// await page.goto(process.env.PUPPETEER_HOST)
})
test('[table] create event', async () => {
test('[table] Open create event component', async () => {
await page.setViewport({width: 1200, height: 720});
await page.goto(process.env.PUPPETEER_HOST); // wait until page load
+43 -43
View File
@@ -48,62 +48,62 @@ export const loginTest = async (page) => {
describe('Puppeteer tests', () => {
beforeAll(async () => {
// await page.goto(process.env.PUPPETEER_HOST)
beforeAll(async () => {
// await page.goto(process.env.PUPPETEER_HOST)
})
})
test('[table] Clear Code button and set pin', async () => {
test('[table] Clear Code button and set pin', async () => {
const pathname = await page.evaluate( () => window.location.pathname)
if (pathname == '/') {
// const browser = await puppeteer.launch({headless: false});
await page.setViewport({width: 1200, height: 720});
await page.goto(process.env.PUPPETEER_HOST); // wait until page load
await page.waitForSelector('.btn-ok')
const pathname = await page.evaluate( () => window.location.pathname)
if (pathname == '/') {
// const browser = await puppeteer.launch({headless: false});
await page.setViewport({width: 1200, height: 720});
await page.goto(process.env.PUPPETEER_HOST); // wait until page load
await page.waitForSelector('.btn-ok')
await page.evaluate( () => {
let a: HTMLInputElement = document.querySelector('input[type="text"]')
a.value = ''
await page.evaluate( () => {
let a: HTMLInputElement = document.querySelector('input[type="text"]')
a.value = ''
let b: HTMLInputElement = document.querySelector('input[type="password"')
b.value = ''
})
let b: HTMLInputElement = document.querySelector('input[type="password"')
b.value = ''
})
await page.type('input[type="text"]', environment.defaultuser);
await page.type('input[type="password"]', environment.defaultuserpwd);
// click and wait for navigation
await Promise.all([
page.click('.btn-ok'),
// page.waitForNavigation({ waitUntil: 'networkidle0' }),
]);
await page.type('input[type="text"]', environment.defaultuser);
await page.type('input[type="password"]', environment.defaultuserpwd);
// click and wait for navigation
await Promise.all([
page.click('.btn-ok'),
// page.waitForNavigation({ waitUntil: 'networkidle0' }),
]);
await page.waitForSelector('.circle')
// define code
await page.click('.circle')
await page.click('.circle')
await page.click('.circle')
await page.waitForSelector('.circle')
// define code
await page.click('.circle')
await page.click('.circle')
await page.click('.circle')
// clear code
await page.click('.cy-clear')
// clear code
await page.click('.cy-clear')
// define code
await page.click('.circle')
await page.click('.circle')
await page.click('.circle')
await page.click('.circle')
// define code
await page.click('.circle')
await page.click('.circle')
await page.click('.circle')
await page.click('.circle')
await page.waitForSelector('.div-profile')
await page.click('.div-profile')
}
expect(3 + 2).toBe(5);
},30000);
await page.waitForSelector('.div-profile')
await page.click('.div-profile')
}
expect(3 + 2).toBe(5);
},30000);