2018-05-23 13:39:18 +00:00
|
|
|
const {
|
|
|
|
device, expect, element, by, waitFor
|
|
|
|
} = require('detox');
|
2020-05-20 16:33:40 +00:00
|
|
|
const data = require('../../data');
|
2020-07-22 16:32:21 +00:00
|
|
|
const { navigateToLogin, login, tapBack, sleep, searchRoom, mockMessage, starMessage, pinMessage } = require('../../helpers/app');
|
2021-06-23 21:00:26 +00:00
|
|
|
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
2020-11-30 20:00:31 +00:00
|
|
|
const { sendMessage } = require('../../helpers/data_setup')
|
2018-05-23 13:39:18 +00:00
|
|
|
|
2021-06-23 19:06:55 +00:00
|
|
|
const platformTypes = require('../../helpers/platformTypes');
|
|
|
|
|
2018-05-23 13:39:18 +00:00
|
|
|
async function navigateToRoomActions(type) {
|
|
|
|
let room;
|
|
|
|
if (type === 'd') {
|
|
|
|
room = 'rocket.cat';
|
|
|
|
} else {
|
2020-07-22 16:32:21 +00:00
|
|
|
room = data.groups.private.name;
|
2018-05-23 13:39:18 +00:00
|
|
|
}
|
2020-07-06 20:56:28 +00:00
|
|
|
await searchRoom(room);
|
2021-01-20 19:53:12 +00:00
|
|
|
await element(by.id(`rooms-list-view-item-${ room }`)).tap();
|
2020-06-15 14:00:46 +00:00
|
|
|
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();
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('room-actions-view'))).toExist().withTimeout(5000);
|
2018-05-23 13:39:18 +00:00
|
|
|
}
|
|
|
|
|
2018-10-23 21:39:48 +00:00
|
|
|
async function backToActions() {
|
|
|
|
await tapBack();
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('room-actions-view'))).toExist().withTimeout(2000);
|
2018-05-23 13:39:18 +00:00
|
|
|
}
|
|
|
|
|
2018-08-31 18:13:30 +00:00
|
|
|
async function backToRoomsList() {
|
|
|
|
await tapBack();
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('room-view'))).toExist().withTimeout(2000);
|
2018-10-23 21:39:48 +00:00
|
|
|
await tapBack();
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('rooms-list-view'))).toExist().withTimeout(2000);
|
2018-05-23 13:39:18 +00:00
|
|
|
}
|
|
|
|
|
2020-11-30 20:00:31 +00:00
|
|
|
async function waitForToast() {
|
|
|
|
await sleep(1000);
|
|
|
|
}
|
|
|
|
|
2018-05-23 13:39:18 +00:00
|
|
|
describe('Room actions screen', () => {
|
2021-06-23 19:06:55 +00:00
|
|
|
let alertButtonType;
|
2020-07-22 16:32:21 +00:00
|
|
|
before(async() => {
|
|
|
|
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
2021-06-23 21:00:26 +00:00
|
|
|
if(device.getPlatform() == 'android') await prepareAndroid();
|
2020-07-22 16:32:21 +00:00
|
|
|
await navigateToLogin();
|
|
|
|
await login(data.users.regular.username, data.users.regular.password);
|
2021-06-23 19:06:55 +00:00
|
|
|
({ alertButtonType } = platformTypes[device.getPlatform()]);
|
2020-07-22 16:32:21 +00:00
|
|
|
});
|
|
|
|
|
2018-05-23 13:39:18 +00:00
|
|
|
describe('Render', async() => {
|
|
|
|
describe('Direct', async() => {
|
|
|
|
before(async() => {
|
|
|
|
await navigateToRoomActions('d');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should have room actions screen', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-actions-view'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have info', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-actions-info'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
2020-03-03 20:27:38 +00:00
|
|
|
// it('should have voice', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
// await expect(element(by.id('room-actions-voice'))).toExist();
|
2020-03-03 20:27:38 +00:00
|
|
|
// });
|
2018-05-23 13:39:18 +00:00
|
|
|
|
2020-03-03 20:27:38 +00:00
|
|
|
// it('should have video', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
// await expect(element(by.id('room-actions-video'))).toExist();
|
2020-03-03 20:27:38 +00:00
|
|
|
// });
|
2018-05-23 13:39:18 +00:00
|
|
|
|
|
|
|
it('should have files', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-actions-files'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have mentions', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-actions-mentioned'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have starred', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-actions-starred'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have share', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('room-actions-share'))).toExist();
|
|
|
|
await expect(element(by.id('room-actions-share'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have pinned', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('room-actions-pinned'))).toExist();
|
|
|
|
await expect(element(by.id('room-actions-pinned'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have notifications', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('room-actions-notifications'))).toExist();
|
|
|
|
await expect(element(by.id('room-actions-notifications'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have block user', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('room-actions-block-user'))).toExist();
|
|
|
|
await expect(element(by.id('room-actions-block-user'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
after(async() => {
|
2018-08-31 18:13:30 +00:00
|
|
|
await backToRoomsList();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('Channel/Group', async() => {
|
|
|
|
before(async() => {
|
|
|
|
await navigateToRoomActions('c');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should have room actions screen', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-actions-view'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have info', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-actions-info'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
2020-03-03 20:27:38 +00:00
|
|
|
// it('should have voice', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
// await expect(element(by.id('room-actions-voice'))).toExist();
|
2020-03-03 20:27:38 +00:00
|
|
|
// });
|
2018-05-23 13:39:18 +00:00
|
|
|
|
2020-03-03 20:27:38 +00:00
|
|
|
// it('should have video', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
// await expect(element(by.id('room-actions-video'))).toExist();
|
2020-03-03 20:27:38 +00:00
|
|
|
// });
|
2018-05-23 13:39:18 +00:00
|
|
|
|
|
|
|
it('should have members', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-actions-members'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have add user', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-actions-add-user'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have files', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-actions-files'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have mentions', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-actions-mentioned'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have starred', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('room-actions-starred'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have share', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('room-actions-share'))).toExist();
|
|
|
|
await expect(element(by.id('room-actions-share'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have pinned', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('room-actions-pinned'))).toExist();
|
|
|
|
await expect(element(by.id('room-actions-pinned'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have notifications', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('room-actions-notifications'))).toExist();
|
|
|
|
await expect(element(by.id('room-actions-notifications'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have leave channel', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('room-actions-leave-channel'))).toExist();
|
|
|
|
await expect(element(by.id('room-actions-leave-channel'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('Usage', async() => {
|
|
|
|
describe('TDB', async() => {
|
2019-09-18 17:32:12 +00:00
|
|
|
// TODO: test into a jitsi call
|
|
|
|
// it('should NOT navigate to voice call', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
// await waitFor(element(by.id('room-actions-voice'))).toExist();
|
2019-09-18 17:32:12 +00:00
|
|
|
// await element(by.id('room-actions-voice')).tap();
|
2020-06-15 14:00:46 +00:00
|
|
|
// await waitFor(element(by.id('room-actions-view'))).toExist().withTimeout(2000);
|
|
|
|
// await expect(element(by.id('room-actions-view'))).toExist();
|
2019-09-18 17:32:12 +00:00
|
|
|
// });
|
2018-05-23 13:39:18 +00:00
|
|
|
|
2019-09-18 17:32:12 +00:00
|
|
|
// TODO: test into a jitsi call
|
|
|
|
// it('should NOT navigate to video call', async() => {
|
|
|
|
// await element(by.id('room-actions-video')).tap();
|
2020-06-15 14:00:46 +00:00
|
|
|
// await waitFor(element(by.id('room-actions-view'))).toExist().withTimeout(2000);
|
|
|
|
// await expect(element(by.id('room-actions-view'))).toExist();
|
2019-09-18 17:32:12 +00:00
|
|
|
// });
|
2018-05-23 13:39:18 +00:00
|
|
|
|
2019-05-29 21:19:12 +00:00
|
|
|
// TODO: test share room link
|
|
|
|
// it('should NOT navigate to share room', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
// await waitFor(element(by.id('room-actions-share'))).toExist();
|
2019-05-29 21:19:12 +00:00
|
|
|
// await element(by.id('room-actions-share')).tap();
|
2020-06-15 14:00:46 +00:00
|
|
|
// await waitFor(element(by.id('room-actions-view'))).toExist().withTimeout(2000);
|
|
|
|
// await expect(element(by.id('room-actions-view'))).toExist();
|
2019-05-29 21:19:12 +00:00
|
|
|
// });
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
describe('Common', async() => {
|
|
|
|
it('should show mentioned messages', async() => {
|
|
|
|
await element(by.id('room-actions-mentioned')).tap();
|
|
|
|
await waitFor(element(by.id('mentioned-messages-view'))).toExist().withTimeout(2000);
|
2020-06-15 14:00:46 +00:00
|
|
|
// await waitFor(element(by.text(` ${ data.random }mention`))).toExist().withTimeout(60000);
|
2018-05-23 13:39:18 +00:00
|
|
|
await backToActions();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should show starred message and unstar it', async() => {
|
2020-07-22 16:32:21 +00:00
|
|
|
|
|
|
|
//Go back to room and send a message
|
|
|
|
await tapBack();
|
|
|
|
await mockMessage('messageToStar');
|
|
|
|
|
|
|
|
//Star the message
|
|
|
|
await starMessage('messageToStar')
|
|
|
|
|
|
|
|
//Back into Room Actions
|
2021-04-07 18:31:25 +00:00
|
|
|
await element(by.id('room-header')).tap();
|
2020-07-22 16:32:21 +00:00
|
|
|
await waitFor(element(by.id('room-actions-view'))).toExist().withTimeout(5000);
|
|
|
|
|
|
|
|
//Go to starred messages
|
2021-06-09 16:00:01 +00:00
|
|
|
await element(by.id('room-actions-view')).swipe('up');
|
|
|
|
await waitFor(element(by.id('room-actions-starred'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-actions-starred')).tap();
|
|
|
|
await waitFor(element(by.id('starred-messages-view'))).toExist().withTimeout(2000);
|
2021-06-09 16:00:01 +00:00
|
|
|
await waitFor(element(by.text(`${ data.random }messageToStar`).withAncestor(by.id('starred-messages-view')))).toExist().withTimeout(60000);
|
2020-07-22 16:32:21 +00:00
|
|
|
|
|
|
|
//Unstar message
|
2021-06-09 16:00:01 +00:00
|
|
|
await element(by.text(`${ data.random }messageToStar`)).atIndex(0).longPress();
|
2020-06-15 19:35:45 +00:00
|
|
|
await expect(element(by.id('action-sheet'))).toExist();
|
|
|
|
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
2021-06-09 16:00:01 +00:00
|
|
|
await element(by.text('Unstar')).atIndex(0).tap();
|
2020-06-15 19:35:45 +00:00
|
|
|
|
2021-06-09 16:00:01 +00:00
|
|
|
await waitFor(element(by.text(`${ data.random }messageToStar`).withAncestor(by.id('starred-messages-view')))).toBeNotVisible().withTimeout(60000);
|
2018-05-23 13:39:18 +00:00
|
|
|
await backToActions();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should show pinned message and unpin it', async() => {
|
2020-07-22 16:32:21 +00:00
|
|
|
|
|
|
|
//Go back to room and send a message
|
|
|
|
await tapBack();
|
|
|
|
await mockMessage('messageToPin');
|
|
|
|
|
|
|
|
//Pin the message
|
|
|
|
await pinMessage('messageToPin')
|
|
|
|
|
|
|
|
//Back into Room Actions
|
2021-04-07 18:31:25 +00:00
|
|
|
await element(by.id('room-header')).tap();
|
2020-07-22 16:32:21 +00:00
|
|
|
await waitFor(element(by.id('room-actions-view'))).toExist().withTimeout(5000);
|
2021-04-19 14:31:43 +00:00
|
|
|
await element(by.id('room-actions-scrollview')).scrollTo('bottom');
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('room-actions-pinned'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-actions-pinned')).tap();
|
|
|
|
await waitFor(element(by.id('pinned-messages-view'))).toExist().withTimeout(2000);
|
2021-06-09 16:00:01 +00:00
|
|
|
await waitFor(element(by.text(`${ data.random }messageToPin`).withAncestor(by.id('pinned-messages-view')))).toExist().withTimeout(6000);
|
|
|
|
await element(by.text(`${ data.random }messageToPin`).withAncestor(by.id('pinned-messages-view'))).atIndex(0).longPress();
|
2020-06-15 19:35:45 +00:00
|
|
|
|
|
|
|
await expect(element(by.id('action-sheet'))).toExist();
|
|
|
|
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
2021-06-09 16:00:01 +00:00
|
|
|
await element(by.text('Unpin')).atIndex(0).tap();
|
2020-06-15 19:35:45 +00:00
|
|
|
|
2021-06-09 16:00:01 +00:00
|
|
|
await waitFor(element(by.text(`${ data.random }messageToPin`).withAncestor(by.id('pinned-messages-view')))).not.toExist().withTimeout(6000);
|
2018-05-23 13:39:18 +00:00
|
|
|
await backToActions();
|
|
|
|
});
|
|
|
|
|
[TEST] E2E Tests for Teams (#3178)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Added addTeamMember and removeTeamMember
* Minor tweak
* Added deleteTeam function
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Update SelectListView.js
* Update index.js
* Update RoomMembersView
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Minor tweaks
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Remove addTeamMember, update removeTeamMember
* Update Alert
* Minor tweaks
* Minor tweaks
* Minor tweak
* Update showActionSheet on RoomMembersView
* Remove team main from query and move code around
* Fetch roles
* Update RoomMembersView and SelectListView
* Update rocketchat.js
* Updated leaveTeam and handleRemoveFromTeam
* Fix validation
* Remove unnecessary function
* Update RoomActionsView
* Update en.json
* updated deleteTeam function and permissions
* Added showConfirmationAlert
* Added string translations for teams
* Fix permission
* Added moveChannelToTeam and convertToTeam functionality
* Fix SelectListView RadioButton
* Fix moveToTeam
* Added searchBar to SelectListVIew
* Update RoomView , SelectListVIew and string translation for error
* E2E for Teams
* Fix tests and cleanup
* Minor refactor
* Wrong label
* Move/convert
* Fix convert
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-06-04 16:16:05 +00:00
|
|
|
// it('should search and find a message', async() => {
|
2020-07-22 16:32:21 +00:00
|
|
|
|
[TEST] E2E Tests for Teams (#3178)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Added addTeamMember and removeTeamMember
* Minor tweak
* Added deleteTeam function
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Update SelectListView.js
* Update index.js
* Update RoomMembersView
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Minor tweaks
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Remove addTeamMember, update removeTeamMember
* Update Alert
* Minor tweaks
* Minor tweaks
* Minor tweak
* Update showActionSheet on RoomMembersView
* Remove team main from query and move code around
* Fetch roles
* Update RoomMembersView and SelectListView
* Update rocketchat.js
* Updated leaveTeam and handleRemoveFromTeam
* Fix validation
* Remove unnecessary function
* Update RoomActionsView
* Update en.json
* updated deleteTeam function and permissions
* Added showConfirmationAlert
* Added string translations for teams
* Fix permission
* Added moveChannelToTeam and convertToTeam functionality
* Fix SelectListView RadioButton
* Fix moveToTeam
* Added searchBar to SelectListVIew
* Update RoomView , SelectListVIew and string translation for error
* E2E for Teams
* Fix tests and cleanup
* Minor refactor
* Wrong label
* Move/convert
* Fix convert
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-06-04 16:16:05 +00:00
|
|
|
// //Go back to room and send a message
|
|
|
|
// await tapBack();
|
|
|
|
// await mockMessage('messageToFind');
|
2020-07-22 16:32:21 +00:00
|
|
|
|
[TEST] E2E Tests for Teams (#3178)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Added addTeamMember and removeTeamMember
* Minor tweak
* Added deleteTeam function
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Update SelectListView.js
* Update index.js
* Update RoomMembersView
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Minor tweaks
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Remove addTeamMember, update removeTeamMember
* Update Alert
* Minor tweaks
* Minor tweaks
* Minor tweak
* Update showActionSheet on RoomMembersView
* Remove team main from query and move code around
* Fetch roles
* Update RoomMembersView and SelectListView
* Update rocketchat.js
* Updated leaveTeam and handleRemoveFromTeam
* Fix validation
* Remove unnecessary function
* Update RoomActionsView
* Update en.json
* updated deleteTeam function and permissions
* Added showConfirmationAlert
* Added string translations for teams
* Fix permission
* Added moveChannelToTeam and convertToTeam functionality
* Fix SelectListView RadioButton
* Fix moveToTeam
* Added searchBar to SelectListVIew
* Update RoomView , SelectListVIew and string translation for error
* E2E for Teams
* Fix tests and cleanup
* Minor refactor
* Wrong label
* Move/convert
* Fix convert
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-06-04 16:16:05 +00:00
|
|
|
// //Back into Room Actions
|
|
|
|
// await element(by.id('room-header')).tap();
|
|
|
|
// await waitFor(element(by.id('room-actions-view'))).toExist().withTimeout(5000);
|
2020-07-22 16:32:21 +00:00
|
|
|
|
[TEST] E2E Tests for Teams (#3178)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Added addTeamMember and removeTeamMember
* Minor tweak
* Added deleteTeam function
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Update SelectListView.js
* Update index.js
* Update RoomMembersView
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Minor tweaks
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Remove addTeamMember, update removeTeamMember
* Update Alert
* Minor tweaks
* Minor tweaks
* Minor tweak
* Update showActionSheet on RoomMembersView
* Remove team main from query and move code around
* Fetch roles
* Update RoomMembersView and SelectListView
* Update rocketchat.js
* Updated leaveTeam and handleRemoveFromTeam
* Fix validation
* Remove unnecessary function
* Update RoomActionsView
* Update en.json
* updated deleteTeam function and permissions
* Added showConfirmationAlert
* Added string translations for teams
* Fix permission
* Added moveChannelToTeam and convertToTeam functionality
* Fix SelectListView RadioButton
* Fix moveToTeam
* Added searchBar to SelectListVIew
* Update RoomView , SelectListVIew and string translation for error
* E2E for Teams
* Fix tests and cleanup
* Minor refactor
* Wrong label
* Move/convert
* Fix convert
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-06-04 16:16:05 +00:00
|
|
|
// await element(by.id('room-actions-search')).tap();
|
|
|
|
// await waitFor(element(by.id('search-messages-view'))).toExist().withTimeout(2000);
|
|
|
|
// await expect(element(by.id('search-message-view-input'))).toExist();
|
|
|
|
// await element(by.id('search-message-view-input')).replaceText(`/${ data.random }messageToFind/`);
|
2021-06-09 16:00:01 +00:00
|
|
|
// await waitFor(element(by.text(`${ data.random }messageToFind`).withAncestor(by.id('search-messages-view')))).toExist().withTimeout(60000);
|
[TEST] E2E Tests for Teams (#3178)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Added addTeamMember and removeTeamMember
* Minor tweak
* Added deleteTeam function
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Update SelectListView.js
* Update index.js
* Update RoomMembersView
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Minor tweaks
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Remove addTeamMember, update removeTeamMember
* Update Alert
* Minor tweaks
* Minor tweaks
* Minor tweak
* Update showActionSheet on RoomMembersView
* Remove team main from query and move code around
* Fetch roles
* Update RoomMembersView and SelectListView
* Update rocketchat.js
* Updated leaveTeam and handleRemoveFromTeam
* Fix validation
* Remove unnecessary function
* Update RoomActionsView
* Update en.json
* updated deleteTeam function and permissions
* Added showConfirmationAlert
* Added string translations for teams
* Fix permission
* Added moveChannelToTeam and convertToTeam functionality
* Fix SelectListView RadioButton
* Fix moveToTeam
* Added searchBar to SelectListVIew
* Update RoomView , SelectListVIew and string translation for error
* E2E for Teams
* Fix tests and cleanup
* Minor refactor
* Wrong label
* Move/convert
* Fix convert
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-06-04 16:16:05 +00:00
|
|
|
// await backToActions();
|
|
|
|
// });
|
2019-08-23 16:24:15 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
describe('Notification', async() => {
|
|
|
|
it('should navigate to notification preference view', async() => {
|
2021-04-19 14:31:43 +00:00
|
|
|
await element(by.id('room-actions-scrollview')).scrollTo('bottom');
|
2020-07-22 16:32:21 +00:00
|
|
|
await waitFor(element(by.id('room-actions-notifications'))).toExist().withTimeout(2000);
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-actions-notifications')).tap();
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('notification-preference-view'))).toExist().withTimeout(2000);
|
2019-08-23 16:24:15 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have receive notification option', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('notification-preference-view-receive-notification'))).toExist();
|
2019-08-23 16:24:15 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have show unread count option', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('notification-preference-view-unread-count'))).toExist();
|
2019-08-23 16:24:15 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have notification alert option', async() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
await expect(element(by.id('notification-preference-view-alert'))).toExist();
|
2019-08-23 16:24:15 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have push notification option', async() => {
|
2020-07-22 16:32:21 +00:00
|
|
|
await waitFor(element(by.id('notification-preference-view-push-notification'))).toExist().withTimeout(4000);
|
2019-08-23 16:24:15 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have notification audio option', async() => {
|
2020-07-22 16:32:21 +00:00
|
|
|
await waitFor(element(by.id('notification-preference-view-audio'))).toExist().withTimeout(4000);
|
2019-08-23 16:24:15 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have notification sound option', async() => {
|
2020-03-03 20:27:38 +00:00
|
|
|
// Ugly hack to scroll on detox
|
2021-06-09 16:00:01 +00:00
|
|
|
// await element(by.id('room-actions-scrollview')).scrollTo('bottom');
|
2020-07-22 16:32:21 +00:00
|
|
|
await waitFor(element(by.id('notification-preference-view-sound'))).toExist().withTimeout(4000);
|
2019-08-23 16:24:15 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have notification duration option', async() => {
|
2020-07-22 16:32:21 +00:00
|
|
|
await waitFor(element(by.id('notification-preference-view-notification-duration'))).toExist().withTimeout(4000);
|
2019-08-23 16:24:15 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should have email alert option', async() => {
|
2020-07-22 16:32:21 +00:00
|
|
|
await waitFor(element(by.id('notification-preference-view-email-alert'))).toExist().withTimeout(4000);
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
2019-08-23 16:24:15 +00:00
|
|
|
after(async() => {
|
|
|
|
await backToActions();
|
|
|
|
});
|
|
|
|
})
|
2018-05-23 13:39:18 +00:00
|
|
|
|
|
|
|
describe('Channel/Group', async() => {
|
|
|
|
// Currently, there's no way to add more owners to the room
|
|
|
|
// So we test only for the 'You are the last owner...' message
|
2020-07-15 16:28:34 +00:00
|
|
|
|
|
|
|
const user = data.users.alternate
|
|
|
|
|
2018-05-23 13:39:18 +00:00
|
|
|
it('should tap on leave channel and raise alert', async() => {
|
2021-04-19 14:31:43 +00:00
|
|
|
await element(by.id('room-actions-scrollview')).scrollTo('bottom');
|
2020-07-22 16:32:21 +00:00
|
|
|
await waitFor(element(by.id('room-actions-leave-channel'))).toExist().withTimeout(2000);
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-actions-leave-channel')).tap();
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.text('Yes, leave it!'))).toExist().withTimeout(2000);
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.text('Yes, leave it!')).tap();
|
2020-07-22 16:32:21 +00:00
|
|
|
await waitFor(element(by.text('You are the last owner. Please set new owner before leaving the room.'))).toExist().withTimeout(8000);
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.text('OK')).tap();
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('room-actions-view'))).toExist().withTimeout(2000);
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
2020-11-30 20:00:31 +00:00
|
|
|
it('should add users to the room', async() => {
|
2020-07-22 16:32:21 +00:00
|
|
|
await waitFor(element(by.id('room-actions-add-user'))).toExist().withTimeout(4000);
|
2020-03-03 20:27:38 +00:00
|
|
|
await element(by.id('room-actions-add-user')).tap();
|
2020-11-30 20:00:31 +00:00
|
|
|
|
|
|
|
// add rocket.cat
|
|
|
|
const rocketCat = 'rocket.cat';
|
|
|
|
await waitFor(element(by.id(`select-users-view-item-${ rocketCat }`))).toExist().withTimeout(10000);
|
|
|
|
await element(by.id(`select-users-view-item-${ rocketCat }`)).tap();
|
|
|
|
await waitFor(element(by.id(`selected-user-${ rocketCat }`))).toExist().withTimeout(5000);
|
|
|
|
|
2020-07-26 14:28:48 +00:00
|
|
|
await waitFor(element(by.id('select-users-view-search'))).toExist().withTimeout(4000);
|
2020-03-03 20:27:38 +00:00
|
|
|
await element(by.id('select-users-view-search')).tap();
|
2020-07-15 16:28:34 +00:00
|
|
|
await element(by.id('select-users-view-search')).replaceText(user.username);
|
2020-07-22 16:32:21 +00:00
|
|
|
await waitFor(element(by.id(`select-users-view-item-${ user.username }`))).toExist().withTimeout(10000);
|
2020-07-15 16:28:34 +00:00
|
|
|
await element(by.id(`select-users-view-item-${ user.username }`)).tap();
|
|
|
|
await waitFor(element(by.id(`selected-user-${ user.username }`))).toExist().withTimeout(5000);
|
2020-11-30 20:00:31 +00:00
|
|
|
|
2020-03-03 20:27:38 +00:00
|
|
|
await element(by.id('selected-users-view-submit')).tap();
|
2020-11-30 20:00:31 +00:00
|
|
|
await sleep(300);
|
|
|
|
await waitFor(element(by.id('room-actions-members'))).toExist().withTimeout(10000);
|
2020-03-03 20:27:38 +00:00
|
|
|
await element(by.id('room-actions-members')).tap();
|
|
|
|
await element(by.id('room-members-view-toggle-status')).tap();
|
2020-07-15 16:28:34 +00:00
|
|
|
await waitFor(element(by.id(`room-members-view-item-${ user.username }`))).toExist().withTimeout(60000);
|
2021-04-19 14:31:43 +00:00
|
|
|
await backToActions();
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
describe('Room Members', async() => {
|
|
|
|
before(async() => {
|
|
|
|
await element(by.id('room-actions-members')).tap();
|
|
|
|
await waitFor(element(by.id('room-members-view'))).toExist().withTimeout(2000);
|
|
|
|
});
|
|
|
|
|
2018-07-10 13:40:32 +00:00
|
|
|
it('should show all users', async() => {
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-members-view-toggle-status')).tap();
|
2020-07-15 16:28:34 +00:00
|
|
|
await waitFor(element(by.id(`room-members-view-item-${ user.username }`))).toExist().withTimeout(60000);
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should filter user', async() => {
|
2020-07-15 16:28:34 +00:00
|
|
|
await waitFor(element(by.id(`room-members-view-item-${ user.username }`))).toExist().withTimeout(60000);
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-members-view-search')).replaceText('rocket');
|
2020-07-15 16:28:34 +00:00
|
|
|
await waitFor(element(by.id(`room-members-view-item-${ user.username }`))).toBeNotVisible().withTimeout(60000);
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-members-view-search')).tap();
|
|
|
|
await element(by.id('room-members-view-search')).clearText('');
|
2020-07-15 16:28:34 +00:00
|
|
|
await waitFor(element(by.id(`room-members-view-item-${ user.username }`))).toExist().withTimeout(60000);
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
|
2020-11-30 20:00:31 +00:00
|
|
|
it('should remove user from room', async() => {
|
|
|
|
await openActionSheet('rocket.cat');
|
2021-06-09 16:00:01 +00:00
|
|
|
await element(by.text('Remove from room')).tap();
|
|
|
|
await waitFor(element(by.text('Are you sure?'))).toExist().withTimeout(5000);
|
2021-06-23 19:06:55 +00:00
|
|
|
await element(by.text('Yes, remove user!').and(by.type(alertButtonType))).tap();
|
2020-11-30 20:00:31 +00:00
|
|
|
await waitFor(element(by.id('room-members-view-item-rocket.cat'))).toBeNotVisible().withTimeout(60000);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should clear search', async() => {
|
|
|
|
await element(by.id('room-members-view-search')).tap();
|
|
|
|
await element(by.id('room-members-view-search')).clearText('');
|
|
|
|
await waitFor(element(by.id(`room-members-view-item-${ user.username }`))).toExist().withTimeout(60000);
|
|
|
|
});
|
|
|
|
|
|
|
|
const openActionSheet = async(username) => {
|
|
|
|
await waitFor(element(by.id(`room-members-view-item-${ username }`))).toExist().withTimeout(5000);
|
|
|
|
await element(by.id(`room-members-view-item-${ username }`)).tap();
|
|
|
|
await sleep(300);
|
|
|
|
await expect(element(by.id('action-sheet'))).toExist();
|
|
|
|
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
2021-06-09 16:00:01 +00:00
|
|
|
await element(by.id('action-sheet-handle')).swipe('up');
|
2020-11-30 20:00:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const closeActionSheet = async() => {
|
2021-04-19 14:31:43 +00:00
|
|
|
await element(by.id('action-sheet-handle')).swipe('down', 'fast', 0.6);
|
2020-11-30 20:00:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
it('should set/remove as owner', async() => {
|
|
|
|
await openActionSheet(user.username);
|
[TEST] E2E Tests for Teams (#3178)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Added addTeamMember and removeTeamMember
* Minor tweak
* Added deleteTeam function
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Update SelectListView.js
* Update index.js
* Update RoomMembersView
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Minor tweaks
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Remove addTeamMember, update removeTeamMember
* Update Alert
* Minor tweaks
* Minor tweaks
* Minor tweak
* Update showActionSheet on RoomMembersView
* Remove team main from query and move code around
* Fetch roles
* Update RoomMembersView and SelectListView
* Update rocketchat.js
* Updated leaveTeam and handleRemoveFromTeam
* Fix validation
* Remove unnecessary function
* Update RoomActionsView
* Update en.json
* updated deleteTeam function and permissions
* Added showConfirmationAlert
* Added string translations for teams
* Fix permission
* Added moveChannelToTeam and convertToTeam functionality
* Fix SelectListView RadioButton
* Fix moveToTeam
* Added searchBar to SelectListVIew
* Update RoomView , SelectListVIew and string translation for error
* E2E for Teams
* Fix tests and cleanup
* Minor refactor
* Wrong label
* Move/convert
* Fix convert
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-06-04 16:16:05 +00:00
|
|
|
await element(by.id('action-sheet-set-owner')).tap();
|
2020-11-30 20:00:31 +00:00
|
|
|
await waitForToast();
|
|
|
|
|
|
|
|
await openActionSheet(user.username);
|
[TEST] E2E Tests for Teams (#3178)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Added addTeamMember and removeTeamMember
* Minor tweak
* Added deleteTeam function
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Update SelectListView.js
* Update index.js
* Update RoomMembersView
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Minor tweaks
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Remove addTeamMember, update removeTeamMember
* Update Alert
* Minor tweaks
* Minor tweaks
* Minor tweak
* Update showActionSheet on RoomMembersView
* Remove team main from query and move code around
* Fetch roles
* Update RoomMembersView and SelectListView
* Update rocketchat.js
* Updated leaveTeam and handleRemoveFromTeam
* Fix validation
* Remove unnecessary function
* Update RoomActionsView
* Update en.json
* updated deleteTeam function and permissions
* Added showConfirmationAlert
* Added string translations for teams
* Fix permission
* Added moveChannelToTeam and convertToTeam functionality
* Fix SelectListView RadioButton
* Fix moveToTeam
* Added searchBar to SelectListVIew
* Update RoomView , SelectListVIew and string translation for error
* E2E for Teams
* Fix tests and cleanup
* Minor refactor
* Wrong label
* Move/convert
* Fix convert
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-06-04 16:16:05 +00:00
|
|
|
await waitFor(element(by.id('action-sheet-set-owner-checked'))).toBeVisible().withTimeout(6000);
|
|
|
|
await element(by.id('action-sheet-set-owner')).tap();
|
2020-11-30 20:00:31 +00:00
|
|
|
await waitForToast();
|
|
|
|
|
|
|
|
await openActionSheet(user.username);
|
[TEST] E2E Tests for Teams (#3178)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Added addTeamMember and removeTeamMember
* Minor tweak
* Added deleteTeam function
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Update SelectListView.js
* Update index.js
* Update RoomMembersView
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Minor tweaks
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Remove addTeamMember, update removeTeamMember
* Update Alert
* Minor tweaks
* Minor tweaks
* Minor tweak
* Update showActionSheet on RoomMembersView
* Remove team main from query and move code around
* Fetch roles
* Update RoomMembersView and SelectListView
* Update rocketchat.js
* Updated leaveTeam and handleRemoveFromTeam
* Fix validation
* Remove unnecessary function
* Update RoomActionsView
* Update en.json
* updated deleteTeam function and permissions
* Added showConfirmationAlert
* Added string translations for teams
* Fix permission
* Added moveChannelToTeam and convertToTeam functionality
* Fix SelectListView RadioButton
* Fix moveToTeam
* Added searchBar to SelectListVIew
* Update RoomView , SelectListVIew and string translation for error
* E2E for Teams
* Fix tests and cleanup
* Minor refactor
* Wrong label
* Move/convert
* Fix convert
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-06-04 16:16:05 +00:00
|
|
|
await waitFor(element(by.id('action-sheet-set-owner-unchecked'))).toBeVisible().withTimeout(60000);
|
2020-11-30 20:00:31 +00:00
|
|
|
await closeActionSheet();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should set/remove as leader', async() => {
|
|
|
|
await openActionSheet(user.username);
|
[TEST] E2E Tests for Teams (#3178)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Added addTeamMember and removeTeamMember
* Minor tweak
* Added deleteTeam function
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Update SelectListView.js
* Update index.js
* Update RoomMembersView
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Minor tweaks
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Remove addTeamMember, update removeTeamMember
* Update Alert
* Minor tweaks
* Minor tweaks
* Minor tweak
* Update showActionSheet on RoomMembersView
* Remove team main from query and move code around
* Fetch roles
* Update RoomMembersView and SelectListView
* Update rocketchat.js
* Updated leaveTeam and handleRemoveFromTeam
* Fix validation
* Remove unnecessary function
* Update RoomActionsView
* Update en.json
* updated deleteTeam function and permissions
* Added showConfirmationAlert
* Added string translations for teams
* Fix permission
* Added moveChannelToTeam and convertToTeam functionality
* Fix SelectListView RadioButton
* Fix moveToTeam
* Added searchBar to SelectListVIew
* Update RoomView , SelectListVIew and string translation for error
* E2E for Teams
* Fix tests and cleanup
* Minor refactor
* Wrong label
* Move/convert
* Fix convert
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-06-04 16:16:05 +00:00
|
|
|
await element(by.id('action-sheet-set-leader')).tap();
|
2020-11-30 20:00:31 +00:00
|
|
|
await waitForToast();
|
|
|
|
|
|
|
|
await openActionSheet(user.username);
|
[TEST] E2E Tests for Teams (#3178)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Added addTeamMember and removeTeamMember
* Minor tweak
* Added deleteTeam function
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Update SelectListView.js
* Update index.js
* Update RoomMembersView
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Minor tweaks
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Remove addTeamMember, update removeTeamMember
* Update Alert
* Minor tweaks
* Minor tweaks
* Minor tweak
* Update showActionSheet on RoomMembersView
* Remove team main from query and move code around
* Fetch roles
* Update RoomMembersView and SelectListView
* Update rocketchat.js
* Updated leaveTeam and handleRemoveFromTeam
* Fix validation
* Remove unnecessary function
* Update RoomActionsView
* Update en.json
* updated deleteTeam function and permissions
* Added showConfirmationAlert
* Added string translations for teams
* Fix permission
* Added moveChannelToTeam and convertToTeam functionality
* Fix SelectListView RadioButton
* Fix moveToTeam
* Added searchBar to SelectListVIew
* Update RoomView , SelectListVIew and string translation for error
* E2E for Teams
* Fix tests and cleanup
* Minor refactor
* Wrong label
* Move/convert
* Fix convert
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-06-04 16:16:05 +00:00
|
|
|
await waitFor(element(by.id('action-sheet-set-leader-checked'))).toBeVisible().withTimeout(6000);
|
|
|
|
await element(by.id('action-sheet-set-leader')).tap();
|
2020-11-30 20:00:31 +00:00
|
|
|
await waitForToast();
|
|
|
|
|
|
|
|
await openActionSheet(user.username);
|
[TEST] E2E Tests for Teams (#3178)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Added addTeamMember and removeTeamMember
* Minor tweak
* Added deleteTeam function
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Update SelectListView.js
* Update index.js
* Update RoomMembersView
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Minor tweaks
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Remove addTeamMember, update removeTeamMember
* Update Alert
* Minor tweaks
* Minor tweaks
* Minor tweak
* Update showActionSheet on RoomMembersView
* Remove team main from query and move code around
* Fetch roles
* Update RoomMembersView and SelectListView
* Update rocketchat.js
* Updated leaveTeam and handleRemoveFromTeam
* Fix validation
* Remove unnecessary function
* Update RoomActionsView
* Update en.json
* updated deleteTeam function and permissions
* Added showConfirmationAlert
* Added string translations for teams
* Fix permission
* Added moveChannelToTeam and convertToTeam functionality
* Fix SelectListView RadioButton
* Fix moveToTeam
* Added searchBar to SelectListVIew
* Update RoomView , SelectListVIew and string translation for error
* E2E for Teams
* Fix tests and cleanup
* Minor refactor
* Wrong label
* Move/convert
* Fix convert
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-06-04 16:16:05 +00:00
|
|
|
await waitFor(element(by.id('action-sheet-set-owner-unchecked'))).toBeVisible().withTimeout(60000);
|
2020-11-30 20:00:31 +00:00
|
|
|
await closeActionSheet();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should set/remove as moderator', async() => {
|
|
|
|
await openActionSheet(user.username);
|
[TEST] E2E Tests for Teams (#3178)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Added addTeamMember and removeTeamMember
* Minor tweak
* Added deleteTeam function
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Update SelectListView.js
* Update index.js
* Update RoomMembersView
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Minor tweaks
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Remove addTeamMember, update removeTeamMember
* Update Alert
* Minor tweaks
* Minor tweaks
* Minor tweak
* Update showActionSheet on RoomMembersView
* Remove team main from query and move code around
* Fetch roles
* Update RoomMembersView and SelectListView
* Update rocketchat.js
* Updated leaveTeam and handleRemoveFromTeam
* Fix validation
* Remove unnecessary function
* Update RoomActionsView
* Update en.json
* updated deleteTeam function and permissions
* Added showConfirmationAlert
* Added string translations for teams
* Fix permission
* Added moveChannelToTeam and convertToTeam functionality
* Fix SelectListView RadioButton
* Fix moveToTeam
* Added searchBar to SelectListVIew
* Update RoomView , SelectListVIew and string translation for error
* E2E for Teams
* Fix tests and cleanup
* Minor refactor
* Wrong label
* Move/convert
* Fix convert
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-06-04 16:16:05 +00:00
|
|
|
await element(by.id('action-sheet-set-moderator')).tap();
|
2020-11-30 20:00:31 +00:00
|
|
|
await waitForToast();
|
|
|
|
|
|
|
|
await openActionSheet(user.username);
|
[TEST] E2E Tests for Teams (#3178)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Added addTeamMember and removeTeamMember
* Minor tweak
* Added deleteTeam function
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Update SelectListView.js
* Update index.js
* Update RoomMembersView
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Minor tweaks
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Remove addTeamMember, update removeTeamMember
* Update Alert
* Minor tweaks
* Minor tweaks
* Minor tweak
* Update showActionSheet on RoomMembersView
* Remove team main from query and move code around
* Fetch roles
* Update RoomMembersView and SelectListView
* Update rocketchat.js
* Updated leaveTeam and handleRemoveFromTeam
* Fix validation
* Remove unnecessary function
* Update RoomActionsView
* Update en.json
* updated deleteTeam function and permissions
* Added showConfirmationAlert
* Added string translations for teams
* Fix permission
* Added moveChannelToTeam and convertToTeam functionality
* Fix SelectListView RadioButton
* Fix moveToTeam
* Added searchBar to SelectListVIew
* Update RoomView , SelectListVIew and string translation for error
* E2E for Teams
* Fix tests and cleanup
* Minor refactor
* Wrong label
* Move/convert
* Fix convert
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-06-04 16:16:05 +00:00
|
|
|
await waitFor(element(by.id('action-sheet-set-moderator-checked'))).toBeVisible().withTimeout(6000);
|
|
|
|
await element(by.id('action-sheet-set-moderator')).tap();
|
2020-11-30 20:00:31 +00:00
|
|
|
await waitForToast();
|
|
|
|
|
|
|
|
await openActionSheet(user.username);
|
[TEST] E2E Tests for Teams (#3178)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Added addTeamMember and removeTeamMember
* Minor tweak
* Added deleteTeam function
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Update SelectListView.js
* Update index.js
* Update RoomMembersView
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Minor tweaks
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Remove addTeamMember, update removeTeamMember
* Update Alert
* Minor tweaks
* Minor tweaks
* Minor tweak
* Update showActionSheet on RoomMembersView
* Remove team main from query and move code around
* Fetch roles
* Update RoomMembersView and SelectListView
* Update rocketchat.js
* Updated leaveTeam and handleRemoveFromTeam
* Fix validation
* Remove unnecessary function
* Update RoomActionsView
* Update en.json
* updated deleteTeam function and permissions
* Added showConfirmationAlert
* Added string translations for teams
* Fix permission
* Added moveChannelToTeam and convertToTeam functionality
* Fix SelectListView RadioButton
* Fix moveToTeam
* Added searchBar to SelectListVIew
* Update RoomView , SelectListVIew and string translation for error
* E2E for Teams
* Fix tests and cleanup
* Minor refactor
* Wrong label
* Move/convert
* Fix convert
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-06-04 16:16:05 +00:00
|
|
|
await waitFor(element(by.id('action-sheet-set-moderator-unchecked'))).toBeVisible().withTimeout(60000);
|
2020-11-30 20:00:31 +00:00
|
|
|
await closeActionSheet();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should set/remove as mute', async() => {
|
|
|
|
await openActionSheet(user.username);
|
2021-06-09 16:00:01 +00:00
|
|
|
await element(by.text('Mute')).tap();
|
|
|
|
await waitFor(element(by.text('Are you sure?'))).toExist().withTimeout(5000);
|
2021-06-23 19:06:55 +00:00
|
|
|
await element(by.text('Mute').and(by.type(alertButtonType))).tap();
|
2020-11-30 20:00:31 +00:00
|
|
|
await waitForToast();
|
|
|
|
|
|
|
|
await openActionSheet(user.username);
|
2021-06-09 16:00:01 +00:00
|
|
|
await element(by.text('Unmute')).tap();
|
|
|
|
await waitFor(element(by.text('Are you sure?'))).toExist().withTimeout(5000);
|
2021-06-23 19:06:55 +00:00
|
|
|
await element(by.text('Unmute').and(by.type(alertButtonType))).tap();
|
2020-11-30 20:00:31 +00:00
|
|
|
await waitForToast();
|
|
|
|
|
|
|
|
await openActionSheet(user.username);
|
|
|
|
// Tests if Remove as mute worked
|
2021-06-09 16:00:01 +00:00
|
|
|
await waitFor(element(by.text('Mute'))).toExist().withTimeout(5000);
|
2020-11-30 20:00:31 +00:00
|
|
|
await closeActionSheet();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should ignore user', async() => {
|
|
|
|
const message = `${ data.random }ignoredmessagecontent`;
|
2021-04-19 14:31:43 +00:00
|
|
|
const channelName = `#${ data.groups.private.name }`;
|
2020-11-30 20:00:31 +00:00
|
|
|
await sendMessage(user, channelName, message);
|
|
|
|
await openActionSheet(user.username);
|
2021-06-11 18:23:43 +00:00
|
|
|
await element(by.label('Ignore')).atIndex(0).tap();
|
2020-11-30 20:00:31 +00:00
|
|
|
await waitForToast();
|
|
|
|
await backToActions();
|
|
|
|
await tapBack();
|
|
|
|
await waitFor(element(by.id('room-view'))).toExist().withTimeout(60000);
|
2021-06-09 16:00:01 +00:00
|
|
|
await waitFor(element(by.text('Message ignored. Tap to display it.')).atIndex(0)).toExist().withTimeout(60000);
|
|
|
|
await element(by.text('Message ignored. Tap to display it.')).atIndex(0).tap();
|
|
|
|
await waitFor(element(by.text(message)).atIndex(0)).toExist().withTimeout(60000);
|
|
|
|
await element(by.text(message)).atIndex(0).tap();
|
2020-11-30 20:00:31 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should navigate to direct message', async() => {
|
2021-04-07 18:31:25 +00:00
|
|
|
await element(by.id('room-header')).tap();
|
2020-11-30 20:00:31 +00:00
|
|
|
await waitFor(element(by.id('room-actions-view'))).toExist().withTimeout(5000);
|
|
|
|
await element(by.id('room-actions-members')).tap();
|
|
|
|
await waitFor(element(by.id('room-members-view'))).toExist().withTimeout(2000);
|
|
|
|
await element(by.id('room-members-view-toggle-status')).tap();
|
|
|
|
await waitFor(element(by.id(`room-members-view-item-${ user.username }`))).toExist().withTimeout(60000);
|
|
|
|
await openActionSheet(user.username);
|
2021-06-11 18:23:43 +00:00
|
|
|
await element(by.label('Direct message')).atIndex(0).tap();
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('room-view'))).toExist().withTimeout(60000);
|
2020-07-15 16:28:34 +00:00
|
|
|
await waitFor(element(by.id(`room-view-title-${ user.username }`))).toExist().withTimeout(60000);
|
2018-10-23 21:39:48 +00:00
|
|
|
await tapBack();
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('rooms-list-view'))).toExist().withTimeout(2000);
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
describe('Direct', async() => {
|
|
|
|
before(async() => {
|
|
|
|
await navigateToRoomActions('d');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should block/unblock user', async() => {
|
2021-06-09 16:00:01 +00:00
|
|
|
await element(by.id('room-actions-scrollview')).scrollTo('bottom');
|
2020-06-15 14:00:46 +00:00
|
|
|
await waitFor(element(by.id('room-actions-block-user'))).toExist();
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-actions-block-user')).tap();
|
2021-06-09 16:00:01 +00:00
|
|
|
await waitFor(element(by.text('Unblock user'))).toExist().withTimeout(60000);
|
2018-05-23 13:39:18 +00:00
|
|
|
await element(by.id('room-actions-block-user')).tap();
|
2021-06-09 16:00:01 +00:00
|
|
|
await waitFor(element(by.text('Block user'))).toExist().withTimeout(60000);
|
2018-05-23 13:39:18 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|