Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 7 additions & 4 deletions cypress/e2e/apply_configuration.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,15 @@ describe('Apply configuration', () => {
* The open-dialog is non-modal (wrapped in a <div class="eXide-dialog">).
*/
function waitForSaveDialog() {
cy.get('#open-dialog').closest('.eXide-dialog', { timeout: 5000 })
cy.get('#open-dialog').closest('.eXide-dialog', { timeout: 10000 })
.should('have.attr', 'open')
}

function saveDialogShouldBeClosed() {
cy.get('#open-dialog').closest('.eXide-dialog')
// The dialog closes only once the save round trip returns, so this waits on
// the server, not on the DOM. Cypress's 4s default is too tight for the
// first save against a freshly started instance.
cy.get('#open-dialog').closest('.eXide-dialog', { timeout: 10000 })
.should('not.have.attr', 'open')
}

Expand Down Expand Up @@ -150,14 +153,14 @@ describe('Apply configuration', () => {
// waitForSaveDialog()

// Toast should confirm save
cy.get('.eXide-toast', { timeout: 5000 }).should('contain', 'stored')
cy.get('.eXide-toast', { timeout: 10000 }).should('contain', 'stored')


// Dialog should have opened
waitForApplyConfigDialog()

// Toast should confirm application of configuration
cy.get('.eXide-toast', { timeout: 5000 }).should('contain', 'Configuration applied.')
cy.get('.eXide-toast', { timeout: 10000 }).should('contain', 'Configuration applied.')

// Dialog should not have opened
saveDialogShouldBeClosed()
Expand Down
20 changes: 10 additions & 10 deletions cypress/e2e/autocomplete_spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('Autocomplete', () => {
if (!lspAvailable) this.skip()
setContentAndComplete('util:wai')

cy.get('.cm-tooltip-autocomplete', { timeout: 5000 })
cy.get('.cm-tooltip-autocomplete', { timeout: 10000 })
.should('be.visible')
.invoke('text')
.should('contain', 'util:wait')
Expand All @@ -88,7 +88,7 @@ describe('Autocomplete', () => {
setContentAndComplete('util:wai')

cy.wait('@completions', { timeout: 10000 })
cy.get('.cm-tooltip-autocomplete', { timeout: 5000 })
cy.get('.cm-tooltip-autocomplete', { timeout: 10000 })
.should('be.visible')
.invoke('text')
.should('contain', 'util:wait')
Expand All @@ -105,7 +105,7 @@ describe('Autocomplete', () => {
// "let $myVar := 42\nreturn $myVar" — cursor at pos 27 = after "$my"
setContentAndComplete('let $myVar := 42\nreturn $myVar', 27)

cy.get('.cm-tooltip-autocomplete', { timeout: 5000 })
cy.get('.cm-tooltip-autocomplete', { timeout: 10000 })
.should('be.visible')
.invoke('text')
.should('contain', '$myVar')
Expand All @@ -117,7 +117,7 @@ describe('Autocomplete', () => {
setContentAndComplete('util:')

cy.wait('@completions', { timeout: 10000 })
cy.get('.cm-tooltip-autocomplete', { timeout: 5000 })
cy.get('.cm-tooltip-autocomplete', { timeout: 10000 })
.should('be.visible')
.invoke('text')
.should('contain', 'util:')
Expand All @@ -142,7 +142,7 @@ describe('Autocomplete', () => {
// Typing "conc" without "fn:" should suggest fn:concat via default namespace lookup
setContentAndComplete('conc')

cy.get('.cm-tooltip-autocomplete', { timeout: 5000 })
cy.get('.cm-tooltip-autocomplete', { timeout: 10000 })
.should('be.visible')
.invoke('text')
.should('contain', 'concat')
Expand All @@ -154,7 +154,7 @@ describe('Autocomplete', () => {
setContentAndComplete('conc')

cy.wait('@completions', { timeout: 10000 })
cy.get('.cm-tooltip-autocomplete', { timeout: 5000 })
cy.get('.cm-tooltip-autocomplete', { timeout: 10000 })
.should('be.visible')
.invoke('text')
.should('contain', 'concat')
Expand All @@ -171,7 +171,7 @@ describe('Autocomplete', () => {
if (!lspAvailable) this.skip()
setContentAndComplete('fn:conc')

cy.get('.cm-tooltip-autocomplete', { timeout: 5000 })
cy.get('.cm-tooltip-autocomplete', { timeout: 10000 })
.should('be.visible')
.invoke('text')
.should('contain', 'fn:concat')
Expand All @@ -183,7 +183,7 @@ describe('Autocomplete', () => {
setContentAndComplete('fn:conc')

cy.wait('@completions', { timeout: 10000 })
cy.get('.cm-tooltip-autocomplete', { timeout: 5000 })
cy.get('.cm-tooltip-autocomplete', { timeout: 10000 })
.should('be.visible')
.invoke('text')
.should('contain', 'fn:concat')
Expand All @@ -198,7 +198,7 @@ describe('Autocomplete', () => {
if (!lspAvailable) this.skip()
setContentAndComplete('repo:')

cy.get('.cm-tooltip-autocomplete', { timeout: 5000 })
cy.get('.cm-tooltip-autocomplete', { timeout: 10000 })
.should('be.visible')
.invoke('text')
.should('contain', 'repo:deploy')
Expand All @@ -209,7 +209,7 @@ describe('Autocomplete', () => {
if (!lspAvailable) this.skip()
setContentAndComplete('repo')

cy.get('.cm-tooltip-autocomplete', { timeout: 5000 })
cy.get('.cm-tooltip-autocomplete', { timeout: 10000 })
.should('be.visible')
.invoke('text')
.should('contain', 'repo:')
Expand Down
9 changes: 5 additions & 4 deletions cypress/e2e/file_save_spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ describe('File save', () => {
* The open-dialog is non-modal (wrapped in a <div class="eXide-dialog">).
*/
function waitForSaveDialog() {
cy.get('#open-dialog').closest('.eXide-dialog', { timeout: 5000 })
cy.get('#open-dialog').closest('.eXide-dialog', { timeout: 10000 })
.should('have.attr', 'open')
}

function saveDialogShouldBeClosed() {
cy.get('#open-dialog').closest('.eXide-dialog')
// Waits on the save round trip — see the note in apply_configuration.
cy.get('#open-dialog').closest('.eXide-dialog', { timeout: 10000 })
.should('not.have.attr', 'open')
}

Expand Down Expand Up @@ -76,7 +77,7 @@ describe('File save', () => {

// Dialog should close and path should update
saveDialogShouldBeClosed()
cy.get('.path', { timeout: 5000 }).should('contain', testFile)
cy.get('.path', { timeout: 10000 }).should('contain', testFile)
})

it('saves an existing document without opening dialog', () => {
Expand All @@ -91,7 +92,7 @@ describe('File save', () => {
cy.get('#save').click()

// Toast should confirm save
cy.get('.eXide-toast', { timeout: 5000 }).should('contain', 'stored')
cy.get('.eXide-toast', { timeout: 10000 }).should('contain', 'stored')

// Dialog should not have opened
saveDialogShouldBeClosed()
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/websocket_spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('WebSocket transport', () => {
failOnStatusCode: false
}).then(() => {
// Retry until WebSocket delivers the message
cy.wrap(null, { timeout: 5000 }).should(() => {
cy.wrap(null, { timeout: 15000 }).should(() => {
expect(received).to.not.be.null
expect(received.type).to.eq("exist/metrics")
expect(received.version).to.be.a("string")
Expand All @@ -92,7 +92,7 @@ describe('WebSocket transport', () => {
body: { query: 'let $x := retrun $x', base: 'xmldb:exist:///db', uri: 'test.xq' },
failOnStatusCode: false
}).then(() => {
cy.wrap(null, { timeout: 5000 }).should(() => {
cy.wrap(null, { timeout: 15000 }).should(() => {
expect(received).to.not.be.null
expect(received.type).to.eq("textDocument/publishDiagnostics")
expect(received.uri).to.eq("test.xq")
Expand Down
Loading