2021-07-14 11:37:31 +01:00
|
|
|
import { environment } from '../src/environments/environment'
|
2021-07-14 13:17:57 +01:00
|
|
|
import { loginTest } from './login.spec'
|
|
|
|
|
|
2021-07-14 11:37:31 +01:00
|
|
|
|
|
|
|
|
describe('Puppeteer tests', () => {
|
|
|
|
|
|
|
|
|
|
beforeAll(async () => {
|
|
|
|
|
// await page.goto(process.env.PUPPETEER_HOST)
|
|
|
|
|
})
|
|
|
|
|
|
2021-07-14 14:29:03 +01:00
|
|
|
test('[table] Open create event component', async () => {
|
2021-07-14 11:37:31 +01:00
|
|
|
|
|
|
|
|
await page.setViewport({width: 1200, height: 720});
|
|
|
|
|
await page.goto(process.env.PUPPETEER_HOST); // wait until page load
|
2021-07-14 13:17:57 +01:00
|
|
|
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')
|
|
|
|
|
//
|
2021-07-14 11:37:31 +01:00
|
|
|
await page.waitForSelector('app-new-event')
|
|
|
|
|
|
|
|
|
|
expect(3 + 2).toBe(5);
|
|
|
|
|
},30000);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|