Add configs retrying and longer timeout to load

This commit is contained in:
Annie Huang committed 2023-12-09 21:18:03 +08:00
1 parent b0bfbb789c
commit 581e75ee57
2 files changed
+7 -3

No files matched your search

+3
View File
@@ -20,6 +20,9 @@ module.exports = defineConfig({
viewportWidth: 1920,
viewportHeight: 1080,
pageLoadTimeout: 120000,
redirectionLimit: 20,
defaultCommandTimeout: 10000,
retries: { runMode: 5, openMode: 5 },
},
env: {
defaultAccount: getOrFail('TESTING_USERNAME'),
+4 -3
View File
@@ -22,10 +22,11 @@ Cypress.Commands.add('PrepareForGame', () => {
cy.url().should('include', '/map')
cy.visit('/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')
.should('be.visible')
cy.checkTaskInit()
cy.CheckTextElement('#reset', '重來', 'Reset').click()
cy.checkTaskInit()
cy.InitTerminal()
@@ -83,7 +84,7 @@ Cypress.Commands.add('checkPending', () => {
})
Cypress.Commands.add('CompleteStageWithCommands', (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.checkTaskInit()
cy.CheckTextElement('#reset', '重來', 'Reset').click()