Optional oAuth activation in Cypress

This commit is contained in:
Annie Huang committed 2024-02-23 11:34:47 +08:00
1 parent ed142ab27b
commit b1a9a6102c
2 files changed
+19 -13

No files matched your search

+13 -11
View File
@@ -36,17 +36,19 @@ describe('example helloworld app', () => {
cy.CheckTextElement('#SwitchtoRegister', '註冊', 'Sign up')
})
it('Check social account UI', () => {
cy.CheckTextElement(
'#GoogleLogin',
'以 Google 繼續',
'Continue with Google'
)
cy.CheckTextElement('#or', '或', 'or')
cy.CheckTextElement(
'#GitHubLogin',
'以 GitHub 繼續',
'Continue with GitHub'
)
if (Cypress.env('EnableoAuth')) {
cy.CheckTextElement(
'#GoogleLogin',
'以 Google 繼續',
'Continue with Google'
)
cy.CheckTextElement('#or', '或', 'or')
cy.CheckTextElement(
'#GitHubLogin',
'以 GitHub 繼續',
'Continue with GitHub'
)
}
})
it('Check login fail', () => {
cy.LoginWithPassword('dddd', '123456')