diff --git a/cypress/e2e/Assistant.spec.js b/cypress/e2e/Assistant.spec.js index e4dab86d966..ad53710b2b0 100644 --- a/cypress/e2e/Assistant.spec.js +++ b/cypress/e2e/Assistant.spec.js @@ -101,13 +101,16 @@ describe('Assistant', () => { .should('be.visible') .click() + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(1000) + cy.get('[data-cy="translate-input"]') .should('be.visible') - .click() - cy.get('[data-cy="translate-input"]') - .should('be.visible') - .type('Hello World') + .focus() + cy.get('[data-cy="translate-input"]') .should('be.focused') + cy.get('[data-cy="translate-input"]') + .type('Hello World') }) }) diff --git a/cypress/e2e/api/SessionApi.spec.js b/cypress/e2e/api/SessionApi.spec.js index bfc3ec3b867..942370f2710 100644 --- a/cypress/e2e/api/SessionApi.spec.js +++ b/cypress/e2e/api/SessionApi.spec.js @@ -279,12 +279,15 @@ describe('The session Api', function() { it('signals closing connection', function() { cy.then(() => { return new Promise((resolve, reject) => { + // Create a promise that resolves when close completes connection.close() - connection.push({ steps: [messages.update], version, awareness: '' }) - .then( - () => reject(new Error('Push should have thrown ConnectionClosed()')), - resolve, - ) + .then(() => { + connection.push({ steps: [messages.update], version, awareness: '' }) + .then( + () => reject(new Error('Push should have thrown ConnectionClosed()')), + resolve, + ) + }) }) }) })