2020-05-20 16:33:40 +00:00
|
|
|
const data = require('../../data');
|
2021-12-02 13:19:15 +00:00
|
|
|
const { navigateToLogin, login, tapBack, sleep, searchRoom, platformTypes } = require('../../helpers/app');
|
2020-07-22 16:32:21 +00:00
|
|
|
|
2021-07-02 17:39:39 +00:00
|
|
|
const privateRoomName = data.groups.private.name;
|
2018-05-23 13:39:18 +00:00
|
|
|
|
2018-07-10 13:40:32 +00:00
|
|
|
async function navigateToRoomInfo(type) {
|
|
|
|
let room;
|
|
|
|
if (type === 'd') {
|
|
|
|
room = 'rocket.cat';
|
|
|
|
} else {
|
2020-07-22 16:32:21 +00:00
|
|
|
room = privateRoomName;
|
2018-07-10 13:40:32 +00:00
|
|
|
}
|
2020-07-06 20:56:28 +00:00
|
|
|
await searchRoom(room);
|
2021-09-13 20:41:05 +00:00
|
|
|
await element(by.id(`rooms-list-view-item-${room}`)).tap();
|
|
|
|
await waitFor(element(by.id('room-view')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(2000);
|
2021-04-07 18:31:25 +00:00
|
|
|
await element(by.id('room-header')).tap();
|
2021-09-13 20:41:05 +00:00
|
|
|
await waitFor(element(by.id('room-actions-view')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(5000);
|
2018-07-10 13:40:32 +00:00
|
|
|
await element(by.id('room-actions-info')).tap();
|
2021-09-13 20:41:05 +00:00
|
|
|
await waitFor(element(by.id('room-info-view')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(2000);
|
2018-05-23 13:39:18 +00:00
|
|
|
}
|
|
|
|
|
2021-12-02 13:19:15 +00:00
|
|
|
async function swipe(direction) {
|
|
|
|
await element(by.id('room-info-edit-view-list')).swipe(direction, 'fast', 0.8);
|
|
|
|
}
|
|
|
|
|
2020-03-03 20:27:38 +00:00
|
|
|
async function waitForToast() {
|
2020-09-11 14:31:38 +00:00
|
|
|
await sleep(300);
|
2020-03-03 20:27:38 +00:00
|
|
|
}
|
|
|
|
|
2018-05-23 13:39:18 +00:00
|
|
|
describe('Room info screen', () => {
|
2021-12-02 13:19:15 +00:00
|
|
|
let alertButtonType;
|
|
|
|
let textMatcher;
|
2021-09-13 20:41:05 +00:00
|
|
|
before(async () => {
|
2020-07-22 16:32:21 +00:00
|
|
|
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
2021-12-02 13:19:15 +00:00
|
|
|
({ alertButtonType, textMatcher } = platformTypes[device.getPlatform()]);
|
2020-07-22 16:32:21 +00:00
|
|
|
await navigateToLogin();
|
|
|
|
await login(data.users.regular.username, data.users.regular.password);
|
|
|
|
});
|
|
|
|
|
2021-07-02 17:39:39 +00:00
|
|
|
describe('Direct', () => {
|
2021-09-13 20:41:05 +00:00
|
|
|
before(async () => {
|
2018-07-10 13:40:32 +00:00
|
|
|
await navigateToRoomInfo('d');
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should navigate to room info', async () => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-info-view'))).toExist();
|
|
|
|
await expect(element(by.id('room-info-view-name'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2020-07-22 16:32:21 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
after(async () => {
|
2021-07-02 17:39:39 +00:00
|
|
|
await tapBack();
|
|
|
|
await tapBack();
|
|
|
|
await tapBack();
|
|
|
|
});
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
2021-07-02 17:39:39 +00:00
|
|
|
describe('Channel/Group', () => {
|
2021-09-13 20:41:05 +00:00
|
|
|
before(async () => {
|
2018-07-10 13:40:32 +00:00
|
|
|
await navigateToRoomInfo('c');
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
2021-07-02 17:39:39 +00:00
|
|
|
describe('Render', () => {
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have room info view', async () => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-info-view'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have name', async () => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-info-view-name'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have description', async () => {
|
2021-12-02 13:19:15 +00:00
|
|
|
await expect(element(by[textMatcher]('Description'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have topic', async () => {
|
2021-12-02 13:19:15 +00:00
|
|
|
await expect(element(by[textMatcher]('Topic'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have announcement', async () => {
|
2021-12-02 13:19:15 +00:00
|
|
|
await expect(element(by[textMatcher]('Announcement'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have edit button', async () => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-info-view-edit-button'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2021-07-02 17:39:39 +00:00
|
|
|
describe('Render Edit', () => {
|
2021-09-13 20:41:05 +00:00
|
|
|
before(async () => {
|
|
|
|
await waitFor(element(by.id('room-info-view-edit-button')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(10000);
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-view-edit-button')).tap();
|
2021-09-13 20:41:05 +00:00
|
|
|
await waitFor(element(by.id('room-info-edit-view')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(2000);
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have room info edit view', async () => {
|
2018-05-23 13:39:18 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view'))).toExist();
|
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have name input', async () => {
|
2018-05-29 17:09:20 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view-name'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have description input', async () => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view-description'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have topic input', async () => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view-topic'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have announcement input', async () => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view-announcement'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have password input', async () => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view-password'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have type switch', async () => {
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('up');
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view-t'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have ready only switch', async () => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view-ro'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have submit button', async () => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view-submit'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have reset button', async () => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view-reset'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have archive button', async () => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view-archive'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should have delete button', async () => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view-delete'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
after(async () => {
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('down');
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
|
|
|
describe('Usage', () => {
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should change room name', async () => {
|
|
|
|
await element(by.id('room-info-edit-view-name')).replaceText(`${privateRoomName}new`);
|
2021-04-19 14:31:43 +00:00
|
|
|
await element(by.id('room-info-edit-view-list')).swipe('up', 'fast', 0.5);
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('up');
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-submit')).tap();
|
2020-10-30 17:35:07 +00:00
|
|
|
await waitForToast();
|
2018-08-31 18:13:30 +00:00
|
|
|
await tapBack();
|
2021-09-13 20:41:05 +00:00
|
|
|
await waitFor(element(by.id('room-info-view')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(2000);
|
2021-12-02 13:19:15 +00:00
|
|
|
const matcher = device.getPlatform() === 'android' ? 'toHaveText' : 'toHaveLabel';
|
|
|
|
await expect(element(by.id('room-info-view-name')))[matcher](`${privateRoomName}new`);
|
2018-05-23 13:39:18 +00:00
|
|
|
// change name to original
|
|
|
|
await element(by.id('room-info-view-edit-button')).tap();
|
2021-09-13 20:41:05 +00:00
|
|
|
await waitFor(element(by.id('room-info-edit-view')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(2000);
|
|
|
|
await element(by.id('room-info-edit-view-name')).replaceText(`${privateRoomName}`);
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('up');
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-submit')).tap();
|
2020-03-03 20:27:38 +00:00
|
|
|
await waitForToast();
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('down');
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should reset form', async () => {
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-name')).replaceText('abc');
|
|
|
|
await element(by.id('room-info-edit-view-description')).replaceText('abc');
|
|
|
|
await element(by.id('room-info-edit-view-topic')).replaceText('abc');
|
|
|
|
await element(by.id('room-info-edit-view-announcement')).replaceText('abc');
|
|
|
|
await element(by.id('room-info-edit-view-password')).replaceText('abc');
|
|
|
|
await element(by.id('room-info-edit-view-t')).tap();
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('up');
|
2021-07-02 17:39:39 +00:00
|
|
|
await element(by.id('room-info-edit-view-ro')).longPress(); // https://github.com/facebook/react-native/issues/28032
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-react-when-ro')).tap();
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('up');
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-reset')).tap();
|
|
|
|
// after reset
|
2020-07-22 16:32:21 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view-name'))).toHaveText(privateRoomName);
|
2018-05-23 13:39:18 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view-description'))).toHaveText('');
|
|
|
|
await expect(element(by.id('room-info-edit-view-topic'))).toHaveText('');
|
|
|
|
await expect(element(by.id('room-info-edit-view-announcement'))).toHaveText('');
|
|
|
|
await expect(element(by.id('room-info-edit-view-password'))).toHaveText('');
|
2021-12-02 13:19:15 +00:00
|
|
|
// await swipe('down');
|
|
|
|
await expect(element(by.id('room-info-edit-view-t'))).toHaveToggleValue(true);
|
|
|
|
await expect(element(by.id('room-info-edit-view-ro'))).toHaveToggleValue(false);
|
2018-05-23 13:39:18 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view-react-when-ro'))).toBeNotVisible();
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('down');
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should change room description', async () => {
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-description')).replaceText('new description');
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('up');
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-submit')).tap();
|
2020-03-03 20:27:38 +00:00
|
|
|
await waitForToast();
|
2018-08-31 18:13:30 +00:00
|
|
|
await tapBack();
|
2021-09-13 20:41:05 +00:00
|
|
|
await waitFor(element(by.id('room-info-view')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(2000);
|
2021-12-02 13:19:15 +00:00
|
|
|
await expect(element(by[textMatcher]('new description').withAncestor(by.id('room-info-view-description')))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should change room topic', async () => {
|
|
|
|
await waitFor(element(by.id('room-info-view-edit-button')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(10000);
|
2020-05-20 16:33:40 +00:00
|
|
|
await element(by.id('room-info-view-edit-button')).tap();
|
2021-09-13 20:41:05 +00:00
|
|
|
await waitFor(element(by.id('room-info-edit-view')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(2000);
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-topic')).replaceText('new topic');
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('up');
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-submit')).tap();
|
2020-03-03 20:27:38 +00:00
|
|
|
await waitForToast();
|
2018-08-31 18:13:30 +00:00
|
|
|
await tapBack();
|
2021-09-13 20:41:05 +00:00
|
|
|
await waitFor(element(by.id('room-info-view')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(2000);
|
2021-12-02 13:19:15 +00:00
|
|
|
await expect(element(by[textMatcher]('new topic').withAncestor(by.id('room-info-view-topic')))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should change room announcement', async () => {
|
|
|
|
await waitFor(element(by.id('room-info-view-edit-button')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(10000);
|
2020-05-20 16:33:40 +00:00
|
|
|
await element(by.id('room-info-view-edit-button')).tap();
|
2021-09-13 20:41:05 +00:00
|
|
|
await waitFor(element(by.id('room-info-edit-view')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(2000);
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-announcement')).replaceText('new announcement');
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('up');
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-submit')).tap();
|
2020-03-03 20:27:38 +00:00
|
|
|
await waitForToast();
|
2018-08-31 18:13:30 +00:00
|
|
|
await tapBack();
|
2021-09-13 20:41:05 +00:00
|
|
|
await waitFor(element(by.id('room-info-view')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(2000);
|
2021-12-02 13:19:15 +00:00
|
|
|
await expect(element(by[textMatcher]('new announcement').withAncestor(by.id('room-info-view-announcement')))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should change room password', async () => {
|
|
|
|
await waitFor(element(by.id('room-info-view-edit-button')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(10000);
|
2020-05-20 16:33:40 +00:00
|
|
|
await element(by.id('room-info-view-edit-button')).tap();
|
2021-09-13 20:41:05 +00:00
|
|
|
await waitFor(element(by.id('room-info-edit-view')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(2000);
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-password')).replaceText('password');
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('up');
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-submit')).tap();
|
2020-03-03 20:27:38 +00:00
|
|
|
await waitForToast();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should change room type', async () => {
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('down');
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-t')).tap();
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('up');
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-submit')).tap();
|
2020-03-03 20:27:38 +00:00
|
|
|
await waitForToast();
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('down');
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-t')).tap();
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('up');
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-submit')).tap();
|
2020-03-03 20:27:38 +00:00
|
|
|
await waitForToast();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should archive room', async () => {
|
2021-04-19 14:31:43 +00:00
|
|
|
await element(by.id('room-info-edit-view-list')).swipe('up', 'fast', 0.5);
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-archive')).tap();
|
2021-12-02 13:19:15 +00:00
|
|
|
await waitFor(element(by[textMatcher]('Yes, archive it!')))
|
2021-09-13 20:41:05 +00:00
|
|
|
.toExist()
|
|
|
|
.withTimeout(5000);
|
2021-12-02 13:19:15 +00:00
|
|
|
await element(by[textMatcher]('Yes, archive it!').and(by.type(alertButtonType))).tap();
|
2021-09-13 20:41:05 +00:00
|
|
|
await waitFor(element(by.id('room-info-edit-view-unarchive')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(60000);
|
2020-03-03 20:27:38 +00:00
|
|
|
await expect(element(by.id('room-info-edit-view-archive'))).toBeNotVisible();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
it('should delete room', async () => {
|
2021-12-02 13:19:15 +00:00
|
|
|
await swipe('up');
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-info-edit-view-delete')).tap();
|
2021-12-02 13:19:15 +00:00
|
|
|
await waitFor(element(by[textMatcher]('Yes, delete it!')))
|
2021-09-13 20:41:05 +00:00
|
|
|
.toExist()
|
|
|
|
.withTimeout(5000);
|
2021-12-02 13:19:15 +00:00
|
|
|
await element(by[textMatcher]('Yes, delete it!').and(by.type(alertButtonType))).tap();
|
2021-09-13 20:41:05 +00:00
|
|
|
await waitFor(element(by.id('rooms-list-view')))
|
|
|
|
.toExist()
|
|
|
|
.withTimeout(10000);
|
|
|
|
await waitFor(element(by.id(`rooms-list-view-item-${privateRoomName}`)))
|
|
|
|
.toBeNotVisible()
|
|
|
|
.withTimeout(60000);
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|