diff --git a/components/interactables/Volume/Volume.html b/components/interactables/Volume/Volume.html index 1853b58663..3e351582eb 100644 --- a/components/interactables/Volume/Volume.html +++ b/components/interactables/Volume/Volume.html @@ -1,4 +1,7 @@ -
+
-
+
diff --git a/components/views/chat/conversation/Conversation.html b/components/views/chat/conversation/Conversation.html index 334f6bdf97..2f6b16ac1b 100644 --- a/components/views/chat/conversation/Conversation.html +++ b/components/views/chat/conversation/Conversation.html @@ -49,7 +49,11 @@ > diff --git a/components/views/media/Media.html b/components/views/media/Media.html index 637ef81d9a..4d11d282aa 100644 --- a/components/views/media/Media.html +++ b/components/views/media/Media.html @@ -8,6 +8,7 @@
- - + +
- - + +
- - + +
-
+
diff --git a/components/views/media/actions/settings/Settings.html b/components/views/media/actions/settings/Settings.html index 005bf4a5a6..094b4fd822 100644 --- a/components/views/media/actions/settings/Settings.html +++ b/components/views/media/actions/settings/Settings.html @@ -1,4 +1,8 @@ -
+
  • diff --git a/components/views/media/actions/volume/Volume.html b/components/views/media/actions/volume/Volume.html index 1802237e01..13d1b79227 100644 --- a/components/views/media/actions/volume/Volume.html +++ b/components/views/media/actions/volume/Volume.html @@ -10,27 +10,31 @@ v-bind:direction="direction" @returned-value="receivedValue" /> -
    +
    - +
    - - + +
    diff --git a/components/views/media/incomingCall/IncomingCall.html b/components/views/media/incomingCall/IncomingCall.html index 76e7db83ba..88af4f6910 100644 --- a/components/views/media/incomingCall/IncomingCall.html +++ b/components/views/media/incomingCall/IncomingCall.html @@ -25,17 +25,24 @@
    - -
    diff --git a/components/views/media/user/User.html b/components/views/media/user/User.html index 63f1126480..b27e445d75 100644 --- a/components/views/media/user/User.html +++ b/components/views/media/user/User.html @@ -1,6 +1,6 @@
    -
    +
    @@ -8,6 +8,7 @@
    diff --git a/cypress/integration-pair-chat/chat-first-user.js b/cypress/integration-pair-chat/chat-first-user.js index 420851c12d..8327087b75 100644 --- a/cypress/integration-pair-chat/chat-first-user.js +++ b/cypress/integration-pair-chat/chat-first-user.js @@ -6,6 +6,7 @@ const recoverySeed = .filter((item) => item.description === 'Chat Pair A') .map((item) => item.recoverySeed) + '{enter}' const randomPIN = faker.internet.password(7, false, /[A-Z]/, 'test') // generate random PIN +let urlToValidate = 'https://www.google.com' describe('Chat features with two accounts at the same time - First User', () => { it('Load account from Chat Pair A (first account)', () => { @@ -14,30 +15,386 @@ describe('Chat features with two accounts at the same time - First User', () => //Validate Chat Screen is loaded cy.validateChatPageIsLoaded() + //Open a chat conversation with Chat Pair B cy.goToConversation('Chat Pair B') }) - it.skip('Validate video call show local and remote video', () => { - cy.get('[data-cy=toolbar-enable-video]') - .click() - .then(() => { - cy.get('[data-cy=mediastream]', { timeout: 180000 }).should( - 'be.visible', - ) - cy.get('#local-video').should('be.visible') - cy.get('#remote-video', { timeout: 300000 }).should('be.visible') - }) + //Is typing indicator is displayed + it('Validate that is typing message is displayed', { retries: 1 }, () => { + cy.contains('typing', { timeout: 30000 }).should('be.visible') + }) + + //Start of videocall tests + it('Call to User B', () => { + //Start videocall + cy.get('[data-cy=toolbar-enable-audio]').click() + }) + + it.skip('Voice/Video Calling - when receiving a call, should appear an indication waiting for another user to accept', () => { + //Remote user should have a class calling indicating that its being called + cy.get('[data-cy=remote-video]') + .find('[data-cy=media-user-circle]') + .should('have.class', 'calling') + }) + + it('If user A calls user B doing voice call, video call should be deactivated', () => { + //Videocall should be displayed on both sides + cy.get('[data-cy=mediastream]', { timeout: 30000 }).should('be.visible') + + //Validate that video stream from local user is not visible since call started as voice call + cy.get('[data-cy=local-video]') + .find('[data-cy=video-stream]') + .should('not.exist') + + //Validate that video stream from remote user is not visible since call started as voice call + cy.get('[data-cy=remote-video]') + .find('[data-cy=video-stream]') + .should('not.exist') + }) + + it('User should be able to scroll on messages when call modal is open', () => { + //Go to beginning of chat + cy.get('[data-cy=chat-message]') + .first() + .scrollIntoView() + .should('be.visible') + }) + + it('Users can send links in chat while in a video/phone call', () => { + //Send a link in chat + cy.get('[data-cy=editable-input]').trigger('input').paste({ + pasteType: 'text', + pastePayload: urlToValidate, + }) + //Wait until link appears in editable input + cy.get('[data-cy=editable-input]', { timeout: 30000 }).should( + 'have.text', + urlToValidate, + ) + //Send message + cy.get('[data-cy=send-message]').click() + let locatorURL = 'a[href="' + urlToValidate + '"]' + //Ensure that an anchor tag was created with the link that was just sent + cy.get(locatorURL).last().scrollIntoView().should('have.attr', 'href') + }) + + it('Opening a link while in a call should direct you to another browser tab', () => { + //Click on URL that was just sent + cy.validateURLOnClick(urlToValidate) + }) + + it('Video boxes should adjust to size when the user enters fullscreen', () => { + // Click on full screen and validate that videocall is on fullscreen mode + cy.get('[data-cy=go-fullscreen]').click() + cy.get('[data-cy=swiper-slide]').should('have.class', 'fullscreen-media') + + // Click on exit full screen and and validate that videocall is not on fullscreen mode + cy.get('[data-cy=exit-fullscreen]').click() + cy.get('[data-cy=swiper-slide]').should( + 'not.have.class', + 'fullscreen-media', + ) + }) + + it( + 'When the user clicks the video button camera should be enabled', + { retries: 1 }, + () => { + // Click on call video button and validate that video-stream is visible + cy.get('[data-cy=call-video]').click() + cy.get('[data-cy=video-stream]') + .should('be.visible') + .and('have.class', 'loaded') + cy.get('[data-cy=video-unmuted').should('be.visible') + }, + ) + + it( + 'When the user clicks the video button camera should be disabled until the user enables it again', + { retries: 1 }, + () => { + // Click on call video button again and validate that video-stream is muted + cy.get('[data-cy=call-video]').click() + cy.get('[data-cy=video-muted').should('be.visible') + cy.get('[data-cy=video-stream]').should('not.exist') + }, + ) + + it('Should appear an indication when the user is muted on the call', () => { + //Click on call audio to mute audio + cy.get('[data-cy=call-audio]').click() + cy.get('[data-cy=local-video]') + .find('[data-cy=muted-indicator]') + .should('be.visible') + + //Click on call audio to unmute audio + cy.get('[data-cy=call-audio]').click() + cy.get('[data-cy=local-video]') + .find('[data-cy=muted-indicator]') + .should('not.exist') + }) + + it('Users should be able to mute their mic from chat and side menu', () => { + //Mute mic from chat button + cy.get('[data-cy=call-audio]').click() + cy.get('[data-cy=local-video]') + .find('[data-cy=muted-indicator]') + .should('be.visible') + + //Unmute audio from call + cy.get('[data-cy=call-audio]').click() + cy.get('[data-cy=local-video]') + .find('[data-cy=muted-indicator]') + .should('not.exist') + + //Mute mic from side menu + cy.get('[data-cy=sidebar-mic-button]').click() + cy.get('[data-cy=local-video]') + .find('[data-cy=muted-indicator]') + .should('be.visible') + }) + + it('User microphone can be set to active - Mic buttons will not be red', () => { + //Unmute mic from chat button + cy.get('[data-cy=call-audio]').click() + + // Microphone buttons from chat screen and sidebar will show as unmuted + cy.get('[data-cy=audio-unmuted]').should('be.visible') + cy.get('[data-cy=sidebar-mic-unmuted]').should('be.visible') + }) + + it('User can mute microphone and microphone buttons will show as red', () => { + //Click again on button to mute mic from chat button + cy.get('[data-cy=call-audio]').click() + + // Microphone buttons from chat screen and sidebar will show as muted + cy.get('[data-cy=audio-muted]').should('be.visible') + cy.get('[data-cy=sidebar-mic-muted]').should('be.visible') + }) + + it('Remote user can have microphone active - Mute indicator will not be displayed', () => { + cy.get('[data-cy=remote-video]') + .find('[data-cy=muted-indicator]', { timeout: 60000 }) + .should('not.exist') + }) + + it('Remote user can have microphone muted - Mute indicator will be displayed', () => { + cy.get('[data-cy=remote-video]') + .find('[data-cy=muted-indicator]', { timeout: 60000 }) + .should('be.visible') + }) + + it('Duration call appears on the call on the top left', () => { + // Live indicator is displayed while on call + cy.get('[data-cy=elapsed-time]').should('be.visible').and('contain', 'Live') + }) + + it('Current user can mute audio from remote user - Audio indicator will be red', () => { + cy.get('[data-cy=sidebar-audio-button]').click() + cy.get('[data-cy=sidebar-audio-deafened]').should('be.visible') + }) + + it('Videocall Audio Indicator - Is displayed as muted when microphone is muted', () => { + cy.get('[data-cy=volume-at-min]').should('be.visible') + }) + + it('Current user can unmute audio from remote user - Audio indicator will not be red', () => { + cy.get('[data-cy=sidebar-audio-button]').click() + cy.get('[data-cy=sidebar-audio-not-deafened]').should('be.visible') + }) + + it('Current user can activate video - Camera will be displayed and video icon will not be red', () => { + //Activate local camera + cy.get('[data-cy=call-video]').click() + + // Local Camera is loaded + cy.get('[data-cy=local-video]') + .find('[data-cy=video-stream]') + .should('be.visible') + .and('have.class', 'loaded') + + //Video buttons show as unmuted + cy.get('[data-cy=video-unmuted]').should('be.visible') + cy.get('[data-cy=sidebar-video-unmuted]').should('be.visible') + }) + + it('Remote user can enable video - Remote camera will be displayed', () => { + // Remote Camera is loaded + cy.get('[data-cy=remote-video]') + .find('[data-cy=video-stream]', { timeout: 60000 }) + .should('be.visible') + .and('have.class', 'loaded') + }) + + it('Validate video call show local and remote video', () => { + //Both videos can be displayed at the same time + // Local Camera is loaded + cy.get('[data-cy=local-video]') + .find('[data-cy=video-stream]') + .should('be.visible') + .and('have.class', 'loaded') + + // Remote Camera is loaded + cy.get('[data-cy=remote-video]') + .find('[data-cy=video-stream]') + .should('be.visible') + .and('have.class', 'loaded') + }) + + it('Current user can disable video - Camera will not be displayed and video icon will be red', () => { + //Disable local camera + cy.get('[data-cy=call-video]').click() + + // Local Video Stream does not exist in DOM + cy.get('[data-cy=local-video]') + .find('[data-cy=video-stream]') + .should('not.exist') + + //Video buttons show muted + cy.get('[data-cy=video-muted]').should('be.visible') + cy.get('[data-cy=sidebar-video-muted]').should('be.visible') + }) + + it('Remote user can disable video - Remote camera will not be displayed', () => { + // Remote Camera is loaded + cy.get('[data-cy=remote-video]') + .find('[data-cy=video-stream]', { timeout: 30000 }) + .should('not.exist') + }) + + it.skip('Current user can screen share - Screen will be displayed instead of camera', () => { + //Enable screenshare + cy.get('[data-cy=call-screen-share]').click() + + // Local Screenshare is loaded + cy.get('[data-cy=local-video]') + .find('[data-cy=screen-stream]') + .should('be.visible') + .and('have.class', 'loaded') + + //Screen share button show enabled + cy.get('[data-cy=screen-unmuted]').should('be.visible') + }) + + it.skip('Current user can stop screen share - Screen will not be displayed now', () => { + //Stop sharing screen + cy.get('[data-cy=call-screen-share]').click() + + // Local Screenshare is not displayed + cy.get('[data-cy=local-video]') + .find('[data-cy=screen-stream]') + .should('not.exist') + + //Screen share button show enabled + cy.get('[data-cy=screen-muted]').should('be.visible') + }) + + it.skip('Remote screen share - User can see remote screen instead of remote camera', () => { + // Remote Screenshare is loaded + cy.get('[data-cy=remote-video]') + .find('[data-cy=screen-stream]', { timeout: 30000 }) + .should('be.visible') + .and('have.class', 'loaded') + }) + + it.skip('Remote screen share stopped - User will stop seeing the remote screen', () => { + // Remote Screenshare is removed + cy.get('[data-cy=remote-video]') + .find('[data-cy=screen-stream]', { timeout: 30000 }) + .should('not.exist') + }) + + it('Videocall Settings Indicator - Option is not available yet', () => { + cy.get('[data-cy=media-settings]') + .should('be.visible') + //Changing the validation since data-tooltip is no longer a property of the element + .find('svg') + .should('have.attr', 'disabled', 'disabled') + }) + + it('Videocall Audio Indicator - Is displayed in screen', () => { + cy.get('[data-cy=volume-icon]').should('be.visible').click() + }) + + it('Videocall Audio Indicator - User can see the volume slider', () => { + cy.get('[data-cy=volume-slider]').should('be.visible') + }) + + it('Videocall Audio Indicator - When audio is deafened appears as muted', () => { + // Click on deafen audio button + cy.get('[data-cy=sidebar-audio-button]').click() + cy.get('[data-cy=sidebar-audio-deafened]').should('be.visible') - cy.wait(60000) + //Ensure that volume indicator appears as muted + cy.get('[data-cy=volume-at-min]').should('be.visible') - cy.get('[data-cy=call-hangup]') - .click() - .then(() => { - cy.get('[data-cy=mediastream]', { timeout: 30000 }).should('not.exist') - }) + // Undeafen audio button + cy.get('[data-cy=sidebar-audio-button]').click() + cy.get('[data-cy=sidebar-audio-not-deafened]').should('be.visible') + + //Ensure that volume indicator does not appear as muted + cy.get('[data-cy=volume-at-min]').should('not.exist') }) - it.skip('Validate that is typing message is displayed', () => { - cy.contains('typing', { timeout: 180000 }).should('be.visible') + it('Videocall Audio Indicator - Slider can be hidden again', () => { + //Click on volume icon to show the volume slider + cy.get('[data-cy=volume-icon]').click() + cy.get('[data-cy=volume-slider]').should('be.visible') + + //Click on volume icon to hide the volume slider + cy.get('[data-cy=volume-icon]').click() + cy.get('[data-cy=volume-slider]').should('not.exist') + }) + + it('Live Feed indicator should be displayed again if the user navigates to a different page and then return to a call', () => { + //Click on sidebar files to go to Files page + cy.get('[data-cy=sidebar-files]').click() + cy.get('[data-cy=elapsed-time]').should('not.exist') + cy.goToConversation('Chat Pair B') + + //Live Indicator should be visible again + cy.get('[data-cy=elapsed-time]').should('be.visible') + }) + + // Call Finished tests + it('Finish videocall', () => { + //Wait 30 seconds before finishing the call + cy.wait(30000) + cy.get('[data-cy=call-hangup]').click() + }) + + it('When a friend hangs up on a call, a call should end on both sides', () => { + cy.get('[data-cy=mediastream]', { timeout: 30000 }).should('not.exist') + }) + + it('Live Feed indicator should turn off when the user hangs up a call or video', () => { + cy.get('[data-cy=elapsed-time]').should('not.exist') + }) + + it('Call to User B for a second time', () => { + //Start videocall + cy.get('[data-cy=toolbar-enable-audio]').click() + + //Wait 10 seconds until other user denies the call + cy.wait(10000) + }) + + it('Refreshing tab should end call', () => { + //Accept the second incoming call from Chat User B + cy.get('[data-cy=incoming-call]', { timeout: 60000 }).should('be.visible') + cy.get('[data-cy=incoming-call-accept]').click() + cy.get('[data-cy=mediastream]').should('be.visible') + + //Wait until remote side refresh the browser tab and call should be finished on both sides + cy.get('[data-cy=mediastream]', { timeout: 60000 }).should('not.exist') + }) + + it('When closing tab should end a phone call', () => { + cy.get('[data-cy=incoming-call]', { timeout: 90000 }).should('be.visible') + cy.get('[data-cy=incoming-call-accept]').click() + cy.get('[data-cy=mediastream]').should('be.visible') + + //Wait until remote side closes the browser tab and call should be finished on both sides + cy.get('[data-cy=mediastream]', { timeout: 180000 }).should('not.exist') }) }) diff --git a/cypress/integration-pair-chat/chat-second-user.js b/cypress/integration-pair-chat/chat-second-user.js index 8db6b5841c..cf677229ab 100644 --- a/cypress/integration-pair-chat/chat-second-user.js +++ b/cypress/integration-pair-chat/chat-second-user.js @@ -6,42 +6,158 @@ const recoverySeed = .filter((item) => item.description === 'Chat Pair B') .map((item) => item.recoverySeed) + '{enter}' const randomPIN = faker.internet.password(7, false, /[A-Z]/, 'test') // generate random PIN -const longMessage = faker.lorem.words(250) // generate random sentence +const longMessage = faker.lorem.words(50) // generate random sentence describe('Chat features with two accounts at the same time - Second User', () => { it('Load account from Chat Pair B (second account)', () => { //Import first account cy.importAccount(randomPIN, recoverySeed) + //Validate Chat Screen is loaded cy.validateChatPageIsLoaded() + //Open a chat conversation cy.goToConversation('Chat Pair A') + + //Click on toggle sidebar to display sidebar + cy.get('[data-cy=toggle-sidebar]').click() + }) + + it('Type a long message in chat bar without sending it', () => { + //Type a long message + cy.get('[data-cy=editable-input]') + .should('be.visible') + .trigger('input') + .type(longMessage) + .clear() }) - it.skip('Receive Incoming Video Call', () => { + it('Receive Incoming Video Call', () => { + //Answer remote videocall cy.get('[data-cy=incoming-call]', { timeout: 180000 }).should('be.visible') + cy.wait(5000) //Wait 5 seconds before answering to validate calling status on the other user + cy.get('[data-cy=incoming-call-accept]').click() + + //Wait until all validations from other user are completed + cy.wait(60000) }) - it.skip('Answer Incoming Video Call', () => { - cy.get('[data-cy=incoming-call-accept-video]') + it('Mute microphone', () => { + //Click again on button to mute mic from chat button + cy.get('[data-cy=call-audio]').click() + + // Microphone buttons from chat screen and sidebar will show as muted + cy.get('[data-cy=audio-muted]').should('be.visible') + cy.get('[data-cy=sidebar-mic-muted]').should('be.visible') + }) + + it('Enable camera', { retries: 1 }, () => { + //Activate local camera + cy.get('[data-cy=call-video]').click() + + // Local Camera is loaded + cy.get('[data-cy=local-video]') + .find('[data-cy=video-stream]') .should('be.visible') + .and('have.class', 'loaded') + + //Video buttons show as unmuted + cy.get('[data-cy=video-unmuted]').should('be.visible') + cy.get('[data-cy=sidebar-video-unmuted]').should('be.visible') + cy.wait(30000) + }) + + it('Disable camera', () => { + //Turn off local camera + cy.get('[data-cy=call-video]').click() + + // Local Camera is not loaded + cy.get('[data-cy=local-video]') + .find('[data-cy=video-stream]') + .should('not.exist') + + //Video buttons show as muted + cy.get('[data-cy=video-muted]').should('be.visible') + cy.get('[data-cy=sidebar-video-muted]').should('be.visible') + cy.wait(30000) + }) + + it.skip('Enable screenshare', () => { + //Enable screenshare + cy.get('[data-cy=call-screen-share]').click() + + // Local Screenshare is loaded + cy.get('[data-cy=local-video]') + .find('[data-cy=screen-stream]') + .should('be.visible') + .and('have.class', 'loaded') + + //Screen share button show enabled + cy.get('[data-cy=screen-unmuted]').should('be.visible') + cy.wait(30000) + }) + + it.skip('Disable screenshare', () => { + //Disable screenshare + cy.get('[data-cy=call-screen-share]').click() + + // Local Screenshare is no longer visible + cy.get('[data-cy=local-video]') + .find('[data-cy=screen-stream]') + .should('not.exist') + + //Screen share button show enabled + cy.get('[data-cy=screen-muted]').should('be.visible') + cy.wait(30000) + }) + + it('Call finished on remote side should end call in local side', () => { + cy.get('[data-cy=mediastream]', { timeout: 240000 }).should('not.exist') + }) + + it('User can deny an incoming call', () => { + //Deny incoming videocall + cy.get('[data-cy=incoming-call]', { timeout: 90000 }).should('be.visible') + cy.get('[data-cy=incoming-call-deny]').click() + + //Wait 30 seconds before calling User A again + cy.wait(30000) + }) + + it('Call to User A for a second time', () => { + //Start videocall + cy.get('[data-cy=toolbar-enable-audio]') .click() .then(() => { - cy.get('[data-cy=mediastream]', { timeout: 60000 }).should('be.visible') - cy.get('#local-video').should('be.visible') - cy.wait(60000) - cy.get('[data-cy=mediastream]', { timeout: 60000 }).should('not.exist') + cy.get('[data-cy=mediastream]').should('be.visible') }) + + //Wait 10 seconds before refreshing tab + cy.wait(10000) + }) + + it('Refresh tab to finish the videocall', () => { + //Refresh page + cy.reload() + + //Validate Chat Screen is loaded again after refreshing + cy.validateChatPageIsLoaded() + + //Go to conversation + cy.goToConversation('Chat Pair A') + + //Click on toggle sidebar to display sidebar + cy.get('[data-cy=toggle-sidebar]').click() }) - it.skip('Type a long message in chat bar without sending it', () => { - //Attempt 3 times to ensure that if second account loads before, first account will see the typing indicator - for (let times = 0; times < 3; times++) { - cy.get('[data-cy=editable-input]') - .should('be.visible') - .trigger('input') - .type(longMessage) - .clear() - } + it('Call again to User A for a third time', () => { + //Wait 30 seconds until user reconnects again + cy.wait(30000) + + //Start videocall + cy.get('[data-cy=toolbar-enable-audio]').click() + + //Wait 30 seconds and browser tab will be closed automatically when spec finishes running + cy.wait(30000) }) }) diff --git a/cypress/support/first-user/commands.js b/cypress/support/first-user/commands.js index eecfcd98e6..a816708157 100644 --- a/cypress/support/first-user/commands.js +++ b/cypress/support/first-user/commands.js @@ -74,6 +74,20 @@ Cypress.Commands.add('importAccount', (pin, recoverySeed) => { cy.contains('Recover Account').click() }) +// Chat - URL Commands + +Cypress.Commands.add('validateURLOnClick', (expectedURL) => { + let locatorURL = 'a[href="' + expectedURL + '"]' + cy.get(locatorURL) + .last() + .scrollIntoView() + .should('have.attr', 'href', expectedURL) + .should('have.attr', 'target', '_blank') + .then((link) => { + cy.request(link.prop('href')).its('status').should('eq', 200) + }) +}) + // Chat - Page Load Commands Cypress.Commands.add('validateChatPageIsLoaded', () => { @@ -91,13 +105,40 @@ Cypress.Commands.add('goToConversation', () => { cy.get('[data-cy=sidebar-user-name]', { timeout: 60000 }) cy.getAttached('[data-cy=sidebar-user-name]').click() - // Hide sidebar - cy.get('[data-cy=hamburger-button]').click() - //Wait until conversation is fully loaded - cy.get('[data-cy=message-loading]', { timeout: 180000 }).should('not.exist') + cy.get('[data-cy=chat-message]', { timeout: 180000 }) + .last() + .should('be.visible') }) +// Paste Command + +Cypress.Commands.add( + 'paste', + { prevSubject: true }, + function (subject, pasteOptions) { + const { pastePayload, pasteType } = pasteOptions + const data = + pasteType === 'application/json' + ? JSON.stringify(pastePayload) + : pastePayload + // https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer + const clipboardData = new DataTransfer() + clipboardData.setData(pasteType, data) + // https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event + const pasteEvent = new ClipboardEvent('paste', { + bubbles: true, + cancelable: true, + dataType: pasteType, + data, + clipboardData, + }) + subject[0].dispatchEvent(pasteEvent) + + return subject + }, +) + // Get element attached to DOM Cypress.Commands.add('getAttached', (selector) => { diff --git a/cypress/support/second-user/commands.js b/cypress/support/second-user/commands.js index eecfcd98e6..36a85bcc8b 100644 --- a/cypress/support/second-user/commands.js +++ b/cypress/support/second-user/commands.js @@ -65,6 +65,7 @@ Cypress.Commands.add('importAccount', (pin, recoverySeed) => { .should('be.visible') .trigger('input') .type(pin, { log: false }, { force: true }) + cy.get('[data-cy=switch-button]').click() //store PIN cy.get('[data-cy=submit-input]').click() cy.get('[data-cy=import-account-button]', { timeout: 60000 }).click() cy.get('[data-cy=add-passphrase]') diff --git a/layouts/chat.vue b/layouts/chat.vue index 1962b3f080..886eaae16a 100644 --- a/layouts/chat.vue +++ b/layouts/chat.vue @@ -42,6 +42,7 @@