fix open groups and link device test

pull/1137/head
Audric Ackermann 5 years ago
parent 73e15250d7
commit 70990a60ba
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -322,10 +322,11 @@ module.exports = {
},
async addFriendToNewClosedGroup(members, useSenderKeys) {
await app.client.element(ConversationPage.globeButtonSection).click();
await app.client.element(ConversationPage.createClosedGroupButton).click();
const [app, ...others] = members;
await app.client.element(ConversationPage.conversationButtonSection).click();
await app.client.element(ConversationPage.createClosedGroupButton).click();
await this.setValueWrapper(
app,
ConversationPage.closedGroupNameTextarea,
@ -500,7 +501,7 @@ module.exports = {
await app1.client.waitForExist(
ConversationPage.noPairedDeviceMessage,
2000
5000
);
await app1.client.element(ConversationPage.linkDeviceButton).isEnabled()
.should.eventually.be.true;
@ -619,7 +620,7 @@ module.exports = {
},
async joinOpenGroup(app, openGroupUrl, name) {
await app.client.element(ConversationPage.globeButtonSection).click();
await app.client.element(ConversationPage.conversationButtonSection).click();
await app.client.element(ConversationPage.joinOpenGroupButton).click();
await this.setValueWrapper(

@ -45,7 +45,7 @@ describe('Link Device', function() {
it('linkDevice:sync no groups, closed group, nor open groups', async () => {
await common.linkApp2ToApp(app, app2, common.TEST_PUBKEY1);
await common.timeout(5000);
await common.timeout(10000);
// get logs at this stage (getRenderProcessLogs() clears the app logs)
const secondaryRenderLogs = await app2.client.getRenderProcessLogs();

@ -30,9 +30,6 @@ describe('Message Functions', function() {
});
it('can send attachment', async () => {
await app.client.element(ConversationPage.globeButtonSection).click();
await app.client.element(ConversationPage.createClosedGroupButton).click();
// create group and add new friend
await common.addFriendToNewClosedGroup([app, app2], false);

@ -7,7 +7,7 @@ const ConversationPage = require('./page-objects/conversation.page');
describe('Open groups', function() {
let app;
this.timeout(30000);
this.timeout(40000);
this.slow(15000);
beforeEach(async () => {
@ -39,7 +39,7 @@ describe('Open groups', function() {
);
// adding a second time the same open group
await app.client.element(ConversationPage.globeButtonSection).click();
await app.client.element(ConversationPage.conversationButtonSection).click();
await app.client.element(ConversationPage.joinOpenGroupButton).click();
await common.setValueWrapper(
@ -64,7 +64,7 @@ describe('Open groups', function() {
it('openGroup: can send message to open group', async () => {
// join dev-chat group
await app.client.element(ConversationPage.globeButtonSection).click();
await app.client.element(ConversationPage.conversationButtonSection).click();
await app.client.element(ConversationPage.joinOpenGroupButton).click();
await common.setValueWrapper(

@ -40,8 +40,6 @@ module.exports = {
'//*[contains(@class, "session-modal")]//div[contains(string(), "Delete") and contains(@class, "session-button")]',
// channels
globeButtonSection:
'//*[contains(@class,"session-icon-button") and .//*[contains(@class, "globe")]]',
joinOpenGroupButton: commonPage.divRoleButtonWithText('Join Open Group'),
openGroupInputUrl: commonPage.textAreaWithPlaceholder('chat.getsession.org'),
sessionToastJoinOpenGroupSuccess: commonPage.toastWithText(

@ -39,15 +39,12 @@ async function makeFriendsPlusMessage(app, [app2, pubkey]) {
);
// Click away so we can call this function again
await app.client.element(ConversationPage.globeButtonSection).click();
await app.client.element(ConversationPage.conversationButtonSection).click();
}
async function testTwoMembers() {
const [app, app2] = await common.startAppsAsFriends();
await app.client.element(ConversationPage.globeButtonSection).click();
await app.client.element(ConversationPage.createClosedGroupButton).click();
const useSenderKeys = true;
// create group and add new friend
@ -106,9 +103,6 @@ async function testThreeMembers() {
const useSenderKeys = true;
await app1.client.element(ConversationPage.globeButtonSection).click();
await app1.client.element(ConversationPage.createClosedGroupButton).click();
// 3. Add all three to the group
await common.addFriendToNewClosedGroup([app1, app2, app3], useSenderKeys);

Loading…
Cancel
Save