Improve test

This commit is contained in:
Peter Maquiran
2021-07-14 13:17:57 +01:00
parent 732fff2025
commit 5614fc38fd
5 changed files with 127 additions and 73 deletions
+30
View File
@@ -0,0 +1,30 @@
import { environment } from '../src/environments/environment'
import { loginTest } from './login.spec'
describe('Puppeteer tests', () => {
beforeAll(async () => {
// await page.goto(process.env.PUPPETEER_HOST)
})
test('[table] create event', async () => {
await page.setViewport({width: 1200, height: 720});
await page.goto(process.env.PUPPETEER_HOST); // wait until page load
await page.waitForSelector('ion-app')
await loginTest(page)
// wait for footer button
await page.click('ion-tab-bar ion-tab-button:nth-child(2)')
// click add event
await page.click('ion-content ion-row .cy-add-event')
//
await page.waitForSelector('app-new-event')
expect(3 + 2).toBe(5);
},30000);
});