mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 11:30:12 +08:00
fix usage
This commit is contained in:
1 parent
839b87b478
commit
a351eef898
2 files changed
+3
-3
No files matched your search
@@ -23,7 +23,7 @@ export function checkHint(index, total) {
|
|||||||
.contains(`${index}/${total}`)
|
.contains(`${index}/${total}`)
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
}
|
}
|
||||||
const finishSign = 'commander:~ '
|
const finishSign = 'commander:~ $'
|
||||||
const continueSign = '↵'
|
const continueSign = '↵'
|
||||||
const storyStart = 'Unix Spirit: '
|
const storyStart = 'Unix Spirit: '
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ describe('example helloworld app', () => {
|
|||||||
cy.get('.xterm-screen').as('Terminaltextbox').should('be.visible')
|
cy.get('.xterm-screen').as('Terminaltextbox').should('be.visible')
|
||||||
cy.findByRole('button', { name: 'Reset' }).click()
|
cy.findByRole('button', { name: 'Reset' }).click()
|
||||||
cy.typeInCommand('clear{enter}')
|
cy.typeInCommand('clear{enter}')
|
||||||
cy.get('@Terminaltextbox').should('contain', 'commander:~ $')
|
cy.get('@Terminaltextbox').should('contain', finishSign)
|
||||||
})
|
})
|
||||||
it('Check Header', () => {
|
it('Check Header', () => {
|
||||||
cy.get('#quest').should('be.visible')
|
cy.get('#quest').should('be.visible')
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ Cypress.Commands.add('typeInCommand', (command) => {
|
|||||||
cy.get('.xterm-screen').type(command)
|
cy.get('.xterm-screen').type(command)
|
||||||
})
|
})
|
||||||
Cypress.Commands.add('getQuestInfo', (id) => {
|
Cypress.Commands.add('getQuestInfo', (id) => {
|
||||||
return cy.get('#quest').get('p.text-text').contains(`${id}`)
|
return cy.get('#quest').find('p.text-text').contains(`${id}`)
|
||||||
})
|
})
|
||||||
Cypress.Commands.add('getTaskCheckbox', (id) => {
|
Cypress.Commands.add('getTaskCheckbox', (id) => {
|
||||||
return cy.getQuestInfo(id).findByRole('checkbox')
|
return cy.getQuestInfo(id).findByRole('checkbox')
|
||||||
|
|||||||
Reference in new issue
Block a user