fix linkDevice test

pull/1137/head
Audric Ackermann 6 years ago
parent e64064aed1
commit 35cbb4cdd6
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -25,9 +25,6 @@ describe('Closed groups', function() {
}); });
it('closedGroup: can create a closed group with a friend and send/receive a message', async () => { it('closedGroup: can create a closed group with a friend and send/receive a message', async () => {
await app.client.element(ConversationPage.globeButtonSection).click();
await app.client.element(ConversationPage.createClosedGroupButton).click();
// create group and add new friend // create group and add new friend
await common.addFriendToNewClosedGroup(app, app2); await common.addFriendToNewClosedGroup(app, app2);

@ -322,6 +322,9 @@ module.exports = {
}, },
async addFriendToNewClosedGroup(app, app2) { async addFriendToNewClosedGroup(app, app2) {
await app.client.element(ConversationPage.globeButtonSection).click();
await app.client.element(ConversationPage.createClosedGroupButton).click();
await this.setValueWrapper( await this.setValueWrapper(
app, app,
ConversationPage.closedGroupNameTextarea, ConversationPage.closedGroupNameTextarea,
@ -425,17 +428,17 @@ module.exports = {
app1Pubkey app1Pubkey
); );
await app2.client.element(RegistrationPage.linkDeviceTriggerButton).click(); await app2.client.element(RegistrationPage.linkDeviceTriggerButton).click();
await app1.client.waitForExist(RegistrationPage.toastWrapper, 7000); await app1.client.waitForExist(SettingsPage.secretWordsTextInDialog, 7000);
let secretWordsapp1 = await app1.client const secretWordsapp1 = await app1.client
.element(RegistrationPage.secretToastDescription) .element(SettingsPage.secretWordsTextInDialog)
.getText(); .getText();
secretWordsapp1 = secretWordsapp1.split(': ')[1];
await app2.client.waitForExist(RegistrationPage.toastWrapper, 6000); await app2.client.waitForExist(RegistrationPage.toastWrapper, 6000);
await app2.client await app2.client
.element(RegistrationPage.secretToastDescription) .element(RegistrationPage.secretToastDescription)
.getText() .getText()
.should.eventually.be.equal(secretWordsapp1); .should.eventually.be.equal(secretWordsapp1);
await app1.client.element(ConversationPage.allowPairingButton).click(); await app1.client.element(ConversationPage.allowPairingButton).click();
await app1.client.element(ConversationPage.okButton).click(); await app1.client.element(ConversationPage.okButton).click();
// validate device paired in settings list with correct secrets // validate device paired in settings list with correct secrets
@ -545,11 +548,6 @@ module.exports = {
); );
}, },
logsContainsString: async (app1, str) => {
const logs = JSON.stringify(await app1.client.getRenderProcessLogs());
return logs.includes(str);
},
async startStubSnodeServer() { async startStubSnodeServer() {
if (!this.stubSnode) { if (!this.stubSnode) {
this.messages = {}; this.messages = {};

@ -28,9 +28,6 @@ describe('Message Functions', function() {
}); });
it('can send attachment', async () => { 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 // create group and add new friend
await common.addFriendToNewClosedGroup(app, app2); await common.addFriendToNewClosedGroup(app, app2);

@ -17,4 +17,6 @@ module.exports = {
// Confirm is a boolean. Selects confirmation input // Confirm is a boolean. Selects confirmation input
passwordSetModalInput: _confirm => passwordSetModalInput: _confirm =>
`//input[@id = 'password-modal-input${_confirm ? '-confirm' : ''}']`, `//input[@id = 'password-modal-input${_confirm ? '-confirm' : ''}']`,
secretWordsTextInDialog: '//div[@class="device-pairing-dialog__secret-words"]/div[@class="subtle"]',
}; };

Loading…
Cancel
Save