mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 11:30:12 +08:00
Add configs retrying and longer timeout to load
This commit is contained in:
1 parent
b0bfbb789c
commit
581e75ee57
2 files changed
+7
-3
No files matched your search
@@ -20,6 +20,9 @@ module.exports = defineConfig({
|
|||||||
viewportWidth: 1920,
|
viewportWidth: 1920,
|
||||||
viewportHeight: 1080,
|
viewportHeight: 1080,
|
||||||
pageLoadTimeout: 120000,
|
pageLoadTimeout: 120000,
|
||||||
|
redirectionLimit: 20,
|
||||||
|
defaultCommandTimeout: 10000,
|
||||||
|
retries: { runMode: 5, openMode: 5 },
|
||||||
},
|
},
|
||||||
env: {
|
env: {
|
||||||
defaultAccount: getOrFail('TESTING_USERNAME'),
|
defaultAccount: getOrFail('TESTING_USERNAME'),
|
||||||
|
|||||||
@@ -22,10 +22,11 @@ Cypress.Commands.add('PrepareForGame', () => {
|
|||||||
cy.url().should('include', '/map')
|
cy.url().should('include', '/map')
|
||||||
cy.visit('/game/get-started')
|
cy.visit('/game/get-started')
|
||||||
cy.url().should('include', '/game/get-started')
|
cy.url().should('include', '/game/get-started')
|
||||||
cy.get('.xterm-screen', { timeout: 10000 })
|
// check task first so the terminal has better possibility loaded
|
||||||
|
cy.checkTaskInit()
|
||||||
|
cy.get('.xterm-screen', { timeout: 100000 })
|
||||||
.as('Terminaltextbox')
|
.as('Terminaltextbox')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
cy.checkTaskInit()
|
|
||||||
cy.CheckTextElement('#reset', '重來', 'Reset').click()
|
cy.CheckTextElement('#reset', '重來', 'Reset').click()
|
||||||
cy.checkTaskInit()
|
cy.checkTaskInit()
|
||||||
cy.InitTerminal()
|
cy.InitTerminal()
|
||||||
@@ -83,7 +84,7 @@ Cypress.Commands.add('checkPending', () => {
|
|||||||
})
|
})
|
||||||
Cypress.Commands.add('CompleteStageWithCommands', (stagename) => {
|
Cypress.Commands.add('CompleteStageWithCommands', (stagename) => {
|
||||||
cy.visit(`/game/${stagename}`)
|
cy.visit(`/game/${stagename}`)
|
||||||
cy.url().should('include', `/game/${stagename}`)
|
cy.url().should('include', `/game/${stagename}`, { timeout: 50000 })
|
||||||
cy.log(`Completing stage :${stagename}`)
|
cy.log(`Completing stage :${stagename}`)
|
||||||
cy.checkTaskInit()
|
cy.checkTaskInit()
|
||||||
cy.CheckTextElement('#reset', '重來', 'Reset').click()
|
cy.CheckTextElement('#reset', '重來', 'Reset').click()
|
||||||
|
|||||||
Reference in new issue
Block a user