test: Upload Page, rename, reset, back to page. Done.
This commit is contained in:
@@ -7,8 +7,6 @@
|
||||
// commands please read more here:
|
||||
// https://on.cypress.io/custom-commands
|
||||
// ***********************************************
|
||||
//
|
||||
//
|
||||
// -- This is a parent command --
|
||||
const loginApiUrl = Cypress.env('loginApiUrl');
|
||||
Cypress.Commands.add('login', () => {
|
||||
@@ -27,15 +25,10 @@ Cypress.Commands.add('login', () => {
|
||||
})
|
||||
});
|
||||
// 呼叫方式: cy.login()
|
||||
//
|
||||
//
|
||||
// -- This is a child command --
|
||||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This is a dual command --
|
||||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This will overwrite an existing command --
|
||||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||
// 點擊空白區關閉 Modal,cy.closePopup()
|
||||
Cypress.Commands.add('closePopup', () => {
|
||||
// 點擊 body 以外的區域,使用 force: true 強制觸發點擊
|
||||
cy.get('body').click({ position: 'topLeft'});
|
||||
cy.wait(1000);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user