pull/1077/head
Vincent 5 years ago
parent 958a4c8594
commit e2c73f2fe5

@ -1,6 +0,0 @@
{
"storageProfile": "testIntegration3Profile",
"openDevTools": false,
"updatesEnabled": false,
"localServerPort": "8489"
}

@ -66,8 +66,6 @@ module.exports = {
async setValueWrapper(app, selector, value) {
await app.client.element(selector).click();
// keys, setValue and addValue hang on certain platforms
// could put a branch here to use one of those
// if we know what platforms are good and which ones are broken
if (process.platform === 'darwin') {
await app.client.execute(
@ -325,9 +323,11 @@ module.exports = {
},
async addFriendToNewClosedGroup(app, app2) {
await app.client
.element(ConversationPage.closedGroupNameTextarea)
.setValue(this.VALID_CLOSED_GROUP_NAME1);
await this.setValueWrapper(
app,
ConversationPage.closedGroupNameTextarea,
this.VALID_CLOSED_GROUP_NAME1
);
await app.client
.element(ConversationPage.closedGroupNameTextarea)
.getValue()
@ -335,7 +335,8 @@ module.exports = {
await app.client
.element(ConversationPage.createClosedGroupMemberItem)
.isVisible();
.isVisible()
.should.eventually.be.true;
// select the first friend as a member of the groups being created
await app.client
@ -343,7 +344,8 @@ module.exports = {
.click();
await app.client
.element(ConversationPage.createClosedGroupMemberItemSelected)
.isVisible();
.isVisible()
.should.eventually.be.true;
// trigger the creation of the group
await app.client
@ -356,10 +358,11 @@ module.exports = {
);
await app.client.isExisting(
ConversationPage.headerTitleGroupName(this.VALID_CLOSED_GROUP_NAME1)
);
).should.eventually.be.true;
await app.client
.element(ConversationPage.headerTitleMembers(2))
.isVisible();
.isVisible()
.should.eventually.be.true;
// validate overlay is closed
await app.client
@ -376,7 +379,7 @@ module.exports = {
ConversationPage.rowOpenGroupConversationName(
this.VALID_CLOSED_GROUP_NAME1
)
);
).should.eventually.be.true;
// next check app2 has been invited and has the group in its conversations
await app2.client.waitForExist(
@ -508,9 +511,11 @@ module.exports = {
},
async sendMessage(app, messageText, fileLocation = undefined) {
await app.client
.element(ConversationPage.sendMessageTextarea)
.setValue(messageText);
await this.setValueWrapper(
app,
ConversationPage.sendMessageTextarea,
messageText
);
await app.client
.element(ConversationPage.sendMessageTextarea)
.getValue()
@ -518,9 +523,11 @@ module.exports = {
// attach a file
if (fileLocation) {
await app.client
.element(ConversationPage.attachmentInput)
.setValue(fileLocation);
await this.setValueWrapper(
app,
ConversationPage.attachmentInput,
fileLocation
);
}
// send message

@ -35,7 +35,7 @@ describe('Message Functions', function() {
await common.addFriendToNewClosedGroup(app, app2);
// send attachment from app1 to closed group
const fileLocation = path.join(__dirname, '/test_attachment');
const fileLocation = path.join(__dirname, 'test_attachment');
const messageText = 'test_attachment';
common.sendMessage(app, messageText, fileLocation);

@ -34,9 +34,9 @@ describe('Settings', function() {
});
after(async () => {
// await common.stopApp(app);
// await common.killallElectron();
// await common.stopStubSnodeServer();
await common.stopApp(app);
await common.killallElectron();
await common.stopStubSnodeServer();
});
it('can toggle menubar', async () => {

Loading…
Cancel
Save