mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
extend from global settings and modify cypress config
This commit is contained in:
1 parent
004d232a84
commit
9e108e397b
3 files changed
+21
-17
No files matched your search
@@ -11,7 +11,7 @@ declare global {
|
||||
PrepareForGame(): Chainable<void>
|
||||
InitTerminal(): Chainable<void>
|
||||
typeInCommand(command: string): Chainable<string>
|
||||
getQuestInfo(id: string): Chainable<JQuery<HTMLElement>>
|
||||
getQuestInfo(id: string): Chainable<JQuery<HTMLParagraphElement>>
|
||||
checkHint(index: number, total: number): Chainable<number> // 修改類型
|
||||
checkTaskInit(): Chainable<void>
|
||||
waitUntilActive(last?: boolean): Chainable<void> // 注意小寫boolean,並且變量名應該是小寫
|
||||
@@ -41,7 +41,7 @@ Cypress.Commands.add('LoginWithPassword', (username, password) => {
|
||||
Cypress.Commands.add('PrepareForGame', () => {
|
||||
cy.visit('/')
|
||||
// make sure the login page is loaded
|
||||
cy.url().should('satisfy', (elements) => {
|
||||
cy.url().should('satisfy', (elements: string) => {
|
||||
const text = elements
|
||||
return text.includes('login') || text.includes('register')
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user