Fix some tests

This commit is contained in:
Diego Mello 2023-03-01 10:07:03 -03:00
parent feeec793eb
commit c0fb9291a3
2 changed files with 8 additions and 2 deletions

View File

@ -36,9 +36,9 @@ describe('Discussion', () => {
await waitFor(element(by.id('new-message-view'))) await waitFor(element(by.id('new-message-view')))
.toBeVisible() .toBeVisible()
.withTimeout(2000); .withTimeout(2000);
await waitFor(element(by[textMatcher]('Discussion'))) await waitFor(element(by.id('new-message-view-create-discussion')))
.toBeVisible() .toBeVisible()
.withTimeout(2000); .withTimeout(5000);
await element(by[textMatcher]('Discussion')).atIndex(0).tap(); await element(by[textMatcher]('Discussion')).atIndex(0).tap();
await waitFor(element(by.id('create-discussion-view'))) await waitFor(element(by.id('create-discussion-view')))
.toExist() .toExist()

View File

@ -82,7 +82,13 @@ describe('Create team screen', () => {
it('should delete team', async () => { it('should delete team', async () => {
await element(by.id('room-info-view-edit-button')).tap(); await element(by.id('room-info-view-edit-button')).tap();
await waitFor(element(by.id('room-info-edit-view-list')))
.toBeVisible()
.withTimeout(2000);
await element(by.id('room-info-edit-view-list')).swipe('up', 'fast', 0.5); await element(by.id('room-info-edit-view-list')).swipe('up', 'fast', 0.5);
await waitFor(element(by.id('room-info-edit-view-delete')))
.toBeVisible()
.withTimeout(2000);
await element(by.id('room-info-edit-view-delete')).tap(); await element(by.id('room-info-edit-view-delete')).tap();
await waitFor(element(by[textMatcher]('Yes, delete it!'))) await waitFor(element(by[textMatcher]('Yes, delete it!')))
.toExist() .toExist()