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