test: Upload Page, rename, reset, back to page. Done.

This commit is contained in:
chiayin
2024-01-24 12:29:35 +08:00
parent a93ee122d0
commit 04dec3bbd3
17 changed files with 156 additions and 14 deletions

View File

@@ -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) => { ... })
// 點擊空白區關閉 Modalcy.closePopup()
Cypress.Commands.add('closePopup', () => {
// 點擊 body 以外的區域,使用 force: true 強制觸發點擊
cy.get('body').click({ position: 'topLeft'});
cy.wait(1000);
})