Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
tests(cypress): Wait for close before trying to assert that push throws
Signed-off-by: Julius Knorr <[email protected]>
  • Loading branch information
juliusknorr committed Mar 17, 2025
commit 321038558259556740cf1cbe21371d08002eca9e
4 changes: 1 addition & 3 deletions cypress/e2e/Assistant.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,16 @@ describe('Assistant', () => {
.should('be.visible')
.click()

// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not figure out a way to make this wort otherwise. For some reason running on CI otherwise focusses the NcSelect 🤷


cy.get('[data-cy="translate-input"]')
.should('be.visible')
.focus()

cy.wait(1000)

cy.get('[data-cy="translate-input"]')
.should('be.focused')
cy.get('[data-cy="translate-input"]')
.should('be.visible')
.type('Hello World')
})
})
13 changes: 8 additions & 5 deletions cypress/e2e/api/SessionApi.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
})
})
})
})
Expand Down
Loading