add testinglibrary, some basic test

This commit is contained in:
Annie Huang committed 2023-10-30 14:57:40 +08:00
1 parent f8254b55c9
commit 0c1acf1083
4 files changed
+78 -5

No files matched your search

+8
View File
@@ -23,3 +23,11 @@
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
import '@testing-library/cypress/add-commands'
Cypress.Commands.add('Login', () => {
cy.get('a.text-text-primary').should('contain', 'Log in').click()
cy.get('#username').type('alex')
cy.get('#password').type('123456')
cy.findByRole('button', { name: 'Log in' }).click()
})