|
1 | 1 | import 'cypress-file-upload'; |
2 | 2 | import { setDebugContext, clearDebugContext } from './debugContext'; |
| 3 | +import { cy } from '@faker-js/faker'; |
3 | 4 | const helper = require('./helper'); |
4 | 5 | const chai = require('chai'); |
5 | 6 | const expect = chai.expect; |
@@ -375,20 +376,21 @@ Cypress.Commands.add("shouldNotExist", (element) => { |
375 | 376 | }); |
376 | 377 |
|
377 | 378 | Cypress.Commands.add('checkPaceRunning', () => { |
378 | | - cy.get('.pace-running', { timeout: 10000 }).should('not.exist'); |
379 | | - // cy.get('body', { timeout: 90000 }) |
380 | | - // .invoke('hasClass', 'pace-running') |
381 | | - // .should('eq', false); |
| 379 | + cy.get('body', { timeout: 35000 }) |
| 380 | + .invoke('hasClass', 'pace-running') |
| 381 | + .should('eq', false); |
382 | 382 | }); |
383 | 383 |
|
384 | 384 | Cypress.Commands.add('checkPaceActive', () => { |
385 | | - cy.get('.pace-active', { timeout: 10000 }).should('not.exist'); |
| 385 | + cy.get('body', { timeout: 35000 }) |
| 386 | + .invoke('hasClass', 'pace-active') |
| 387 | + .should('eq', false); |
386 | 388 | }); |
387 | 389 |
|
388 | 390 | Cypress.Commands.add('checkLoading', () => { |
389 | 391 | cy.get('body').then($body => { |
390 | 392 | if ($body.find('.el-loading-mask').length) { |
391 | | - cy.get('.el-loading-mask', { timeout: 20000 }) |
| 393 | + cy.get('.el-loading-mask', { timeout: 35000 }) |
392 | 394 | .should('not.be.visible'); |
393 | 395 | } |
394 | 396 | }); |
|
0 commit comments