mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 19:40:11 +08:00
fix cypress command format
This commit is contained in:
1 parent
f7907a5999
commit
cc03e57c70
1 file changed
+5
-5
@@ -70,18 +70,18 @@ Cypress.Commands.add('CheckTextElement',(id,chText,enText)=>{
|
||||
cy.get(id).within(($element) => {
|
||||
if (Cypress.env('isCHVersion')) {
|
||||
cy.get($element).should('contain', chText).and('be.visible')
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
cy.get($element).should('contain', enText).and('be.visible')
|
||||
}
|
||||
})
|
||||
})
|
||||
Cypress.Commands.add('CheckPlaceholder', (id, chText, enText) => {
|
||||
cy.get(id).invoke('attr', 'placeholder').then(($placeHolder)=>{
|
||||
cy.get(id)
|
||||
.invoke('attr', 'placeholder')
|
||||
.then(($placeHolder) => {
|
||||
if (Cypress.env('isCHVersion')) {
|
||||
expect($placeHolder).eq(chText)
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
expect($placeHolder).eq(enText)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user