mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
comment test and remove console.logs
This commit is contained in:
@@ -42,7 +42,7 @@ export class WsChatMethodsService {
|
||||
rooms.result.update.forEach((roomData: room) => {
|
||||
let room:RoomService;
|
||||
|
||||
console.log(roomData);
|
||||
// console.log(roomData);
|
||||
|
||||
|
||||
room = new RoomService(this.WsChatService, new MessageService())
|
||||
@@ -76,13 +76,13 @@ export class WsChatMethodsService {
|
||||
subscribeToRoom() {
|
||||
for (const id in this.dm) {
|
||||
this.WsChatService.subscribeNotifyRoom(id).then((subscription)=>{
|
||||
console.log('subscription', subscription)
|
||||
// console.log('subscription', subscription)
|
||||
})
|
||||
}
|
||||
|
||||
for (const id in this.group) {
|
||||
this.WsChatService.subscribeNotifyRoom(id).then((subscription)=>{
|
||||
console.log('subscription', subscription)
|
||||
// console.log('subscription', subscription)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
+68
-68
@@ -19,91 +19,91 @@ describe('Puppeteer tests', () => {
|
||||
// await page.goto(process.env.PUPPETEER_HOST)
|
||||
})
|
||||
|
||||
test('Login', async()=> {
|
||||
await loginTest(page)
|
||||
},30000)
|
||||
// test('Login', async()=> {
|
||||
// await loginTest(page)
|
||||
// },30000)
|
||||
|
||||
test('[table] Open create event component', 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
|
||||
await page.waitForSelector('ion-app')
|
||||
// await page.setViewport({width: 1200, height: 720});
|
||||
// await page.goto(process.env.PUPPETEER_HOST); // wait until page load
|
||||
// await page.waitForSelector('ion-app')
|
||||
|
||||
// wait for footer button
|
||||
await page.click('ion-tab-bar ion-tab-button:nth-child(2)')
|
||||
await page.waitForSelector('app-agenda')
|
||||
// // wait for footer button
|
||||
// await page.click('ion-tab-bar ion-tab-button:nth-child(2)')
|
||||
// await page.waitForSelector('app-agenda')
|
||||
|
||||
// click add event
|
||||
await page.click('ion-content ion-row .cy-add-event')
|
||||
// wait for component
|
||||
await page.waitForSelector('app-new-event')
|
||||
// // click add event
|
||||
// await page.click('ion-content ion-row .cy-add-event')
|
||||
// // wait for component
|
||||
// await page.waitForSelector('app-new-event')
|
||||
|
||||
expect(3 + 2).toBe(5);
|
||||
},30000);
|
||||
// expect(3 + 2).toBe(5);
|
||||
// },30000);
|
||||
|
||||
|
||||
test('[table] Create Event', async () => {
|
||||
// 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 page.setViewport({width: 1200, height: 720});
|
||||
// await page.goto(process.env.PUPPETEER_HOST); // wait until page load
|
||||
// await page.waitForSelector('ion-app')
|
||||
|
||||
// wait for footer button
|
||||
await page.click('ion-tab-bar ion-tab-button:nth-child(2)')
|
||||
await page.waitForSelector('app-agenda')
|
||||
// click add event
|
||||
await page.click('ion-content ion-row .cy-add-event')
|
||||
// wait for component
|
||||
await page.waitForSelector('app-new-event')
|
||||
// // wait for footer button
|
||||
// await page.click('ion-tab-bar ion-tab-button:nth-child(2)')
|
||||
// await page.waitForSelector('app-agenda')
|
||||
// // click add event
|
||||
// await page.click('ion-content ion-row .cy-add-event')
|
||||
// // wait for component
|
||||
// await page.waitForSelector('app-new-event')
|
||||
|
||||
// subject
|
||||
await page.type('app-new-event .ion-item-container input', faker.commerce.productDescription() )
|
||||
// Location
|
||||
await page.type('app-new-event .container-div:nth-child(2) input', faker.address.state()+" "+faker.address.city() )
|
||||
// Select Calendar
|
||||
// await page.click('app-new-event .container-div:nth-child(3) .mat-form-field-flex')
|
||||
// await page.waitForSelector('.cdk-overlay-connected-position-bounding-box')
|
||||
// await page.click('.cdk-overlay-connected-position-bounding-box mat-option')
|
||||
// select event type
|
||||
// await page.click('app-new-event .container-div:nth-child(4) .mat-form-field-flex')
|
||||
// await page.waitForSelector('.cdk-overlay-connected-position-bounding-box')
|
||||
// await page.click('.cdk-overlay-connected-position-bounding-box mat-option')
|
||||
// // subject
|
||||
// await page.type('app-new-event .ion-item-container input', faker.commerce.productDescription() )
|
||||
// // Location
|
||||
// await page.type('app-new-event .container-div:nth-child(2) input', faker.address.state()+" "+faker.address.city() )
|
||||
// // Select Calendar
|
||||
// // await page.click('app-new-event .container-div:nth-child(3) .mat-form-field-flex')
|
||||
// // await page.waitForSelector('.cdk-overlay-connected-position-bounding-box')
|
||||
// // await page.click('.cdk-overlay-connected-position-bounding-box mat-option')
|
||||
// // select event type
|
||||
// // await page.click('app-new-event .container-div:nth-child(4) .mat-form-field-flex')
|
||||
// // await page.waitForSelector('.cdk-overlay-connected-position-bounding-box')
|
||||
// // await page.click('.cdk-overlay-connected-position-bounding-box mat-option')
|
||||
|
||||
// select start day
|
||||
// await page.click('app-new-event .container-div:nth-child(5) button')
|
||||
// await page.waitForSelector('.cdk-overlay-connected-position-bounding-box')
|
||||
// await page.click('.mat-calendar-next-button')
|
||||
// let selectedFDay = Math.floor(Math.random()*(25-1+1)+1);
|
||||
// let days = await page.$$(` .mat-calendar-body-cell `)
|
||||
// await days[selectedFDay].click()
|
||||
// await page.click('.cdk-overlay-connected-position-bounding-box .actions button')
|
||||
// // select start day
|
||||
// // await page.click('app-new-event .container-div:nth-child(5) button')
|
||||
// // await page.waitForSelector('.cdk-overlay-connected-position-bounding-box')
|
||||
// // await page.click('.mat-calendar-next-button')
|
||||
// // let selectedFDay = Math.floor(Math.random()*(25-1+1)+1);
|
||||
// // let days = await page.$$(` .mat-calendar-body-cell `)
|
||||
// // await days[selectedFDay].click()
|
||||
// // await page.click('.cdk-overlay-connected-position-bounding-box .actions button')
|
||||
|
||||
// select end day
|
||||
// await page.click('app-new-event .container-div:nth-child(6) button')
|
||||
// await page.waitForSelector('.cdk-overlay-connected-position-bounding-box')
|
||||
// await page.click('.mat-calendar-next-button')
|
||||
// days = await page.$$(` .mat-calendar-body-cell `)
|
||||
// await days[selectedFDay+1].click()
|
||||
// await page.click('.cdk-overlay-connected-position-bounding-box .actions button')
|
||||
// // select end day
|
||||
// // await page.click('app-new-event .container-div:nth-child(6) button')
|
||||
// // await page.waitForSelector('.cdk-overlay-connected-position-bounding-box')
|
||||
// // await page.click('.mat-calendar-next-button')
|
||||
// // days = await page.$$(` .mat-calendar-body-cell `)
|
||||
// // await days[selectedFDay+1].click()
|
||||
// // await page.click('.cdk-overlay-connected-position-bounding-box .actions button')
|
||||
|
||||
// await page.click('app-new-event .container-div:nth-child(7) .mat-form-field-flex')
|
||||
// await page.waitForSelector('.cdk-overlay-connected-position-bounding-box')
|
||||
// await page.click('.cdk-overlay-connected-position-bounding-box mat-option')
|
||||
// // await page.click('app-new-event .container-div:nth-child(7) .mat-form-field-flex')
|
||||
// // await page.waitForSelector('.cdk-overlay-connected-position-bounding-box')
|
||||
// // await page.click('.cdk-overlay-connected-position-bounding-box mat-option')
|
||||
|
||||
await page.click('app-new-event .container-div:nth-child(8) .add-people')
|
||||
await page.waitForSelector('app-attendee-modal .ng-star-inserted:nth-child(2)')
|
||||
await page.click('app-attendee-modal .ng-star-inserted:nth-child(2)')
|
||||
// save
|
||||
await page.click('app-attendee-modal ion-footer ion-buttons:nth-child(2)')
|
||||
// save
|
||||
let buttons = await page.$$('app-new-event ion-footer ion-buttons')
|
||||
buttons[1].click()
|
||||
// await page.click('app-new-event .container-div:nth-child(8) .add-people')
|
||||
// await page.waitForSelector('app-attendee-modal .ng-star-inserted:nth-child(2)')
|
||||
// await page.click('app-attendee-modal .ng-star-inserted:nth-child(2)')
|
||||
// // save
|
||||
// await page.click('app-attendee-modal ion-footer ion-buttons:nth-child(2)')
|
||||
// // save
|
||||
// let buttons = await page.$$('app-new-event ion-footer ion-buttons')
|
||||
// buttons[1].click()
|
||||
|
||||
await page.waitForSelector('.notification .success')
|
||||
// await page.waitForSelector('.notification .success')
|
||||
|
||||
|
||||
expect(3 + 2).toBe(5);
|
||||
},60000);
|
||||
// expect(3 + 2).toBe(5);
|
||||
// },60000);
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user