Add loader and notification message

This commit is contained in:
Peter Maquiran
2021-07-14 11:37:31 +01:00
parent db89f78de8
commit 732fff2025
8 changed files with 162 additions and 197 deletions
+1 -27
View File
@@ -4,36 +4,10 @@ describe('Puppeteer tests', () => {
beforeAll(async () => {
// await page.goto(process.env.PUPPETEER_HOST)
})
test('[table] login', async () => {
// 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 = ''
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.waitForSelector('.circle')
expect(3 + 2).toBe(5);
},30000);
test('[table] Clear Code button and set pin', async () => {
+29
View File
@@ -0,0 +1,29 @@
import { environment } from '../src/environments/environment'
describe('Puppeteer tests', () => {
beforeAll(async () => {
// await page.goto(process.env.PUPPETEER_HOST)
})
test('[table] create event', async () => {
// 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('ion-tab-bar ion-tab-button:nth-child(3)')
await page.click('ion-tab-bar ion-tab-button:nth-child(3)')
await page.waitForSelector('ion-content ion-row .cy-add-event')
await page.waitForSelector('app-new-event')
expect(3 + 2).toBe(5);
},30000);
});
-17
View File
@@ -1,17 +0,0 @@
import { environment } from './../src/environments/environment'
describe('Puppeteer tests', () => {
beforeAll(async () => {
// await page.goto(process.env.PUPPETEER_HOST)
})
test('login', async () => {
expect(3 + 2).toBe(5);
}, 30000);
});