mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 19:40:11 +08:00
fix format
This commit is contained in:
1 parent
869f01a62b
commit
5d26029166
1 file changed
+43
-9
@@ -15,27 +15,55 @@ describe('example helloworld app', () => {
|
||||
cy.CheckPlaceholder('#username', '帳號名稱', 'Username')
|
||||
cy.get('label.text-text-secondary').should('be.visible') // check the rules is displayed
|
||||
cy.CheckPlaceholder('#email', '電子郵件', 'Email')
|
||||
cy.CheckTextElement('#CheckRegistered','已經有帳號了嗎?','Already have an account?')
|
||||
cy.CheckTextElement(
|
||||
'#CheckRegistered',
|
||||
'已經有帳號了嗎?',
|
||||
'Already have an account?'
|
||||
)
|
||||
cy.CheckTextElement('#SwitchtoLogin', '登入', 'Log in')
|
||||
})
|
||||
it('Check Login Page Elements-Login', () => {
|
||||
cy.get('#SwitchtoLogin').click()
|
||||
checkLoginUI()
|
||||
cy.CheckPlaceholder('#username','電子郵件 / 帳號名稱', 'Email / Username')
|
||||
cy.CheckPlaceholder(
|
||||
'#username',
|
||||
'電子郵件 / 帳號名稱',
|
||||
'Email / Username'
|
||||
)
|
||||
cy.get('#LogInOrSignUp').should('be.visible')
|
||||
cy.CheckTextElement('#CheckRegistered','還沒有帳號嗎?',"Don't have an account?")
|
||||
cy.CheckTextElement(
|
||||
'#CheckRegistered',
|
||||
'還沒有帳號嗎?',
|
||||
"Don't have an account?"
|
||||
)
|
||||
cy.CheckTextElement('#SwitchtoRegister', '註冊', 'Sign up')
|
||||
})
|
||||
it('Check social account UI', () => {
|
||||
cy.CheckTextElement('#or', '或', 'or')
|
||||
cy.CheckTextElement('#GoogleLogin','以Google繼續','Continue with Google')
|
||||
cy.CheckTextElement('#GitHubLogin','以GitHub繼續','Continue with GitHub')
|
||||
cy.CheckTextElement(
|
||||
'#GoogleLogin',
|
||||
'以Google繼續',
|
||||
'Continue with Google'
|
||||
)
|
||||
cy.CheckTextElement(
|
||||
'#GitHubLogin',
|
||||
'以GitHub繼續',
|
||||
'Continue with GitHub'
|
||||
)
|
||||
})
|
||||
it('Check login fail', () => {
|
||||
cy.LoginWithPassword('dddd', '123456')
|
||||
cy.CheckTextElement('#ErrorDisplay','錯誤的帳號名稱或密碼。','Wrong username or password.')
|
||||
cy.CheckTextElement(
|
||||
'#ErrorDisplay',
|
||||
'錯誤的帳號名稱或密碼。',
|
||||
'Wrong username or password.'
|
||||
)
|
||||
cy.LoginWithPassword(`ddd\``, '123456')
|
||||
cy.CheckTextElement('#ErrorDisplay','無效的帳號名稱或密碼。','Invalid username or password.')
|
||||
cy.CheckTextElement(
|
||||
'#ErrorDisplay',
|
||||
'無效的帳號名稱或密碼。',
|
||||
'Invalid username or password.'
|
||||
)
|
||||
})
|
||||
it('Login-Password Already Register', () => {
|
||||
cy.LoginWithPassword(
|
||||
@@ -50,7 +78,9 @@ describe('example helloworld app', () => {
|
||||
cy.PrepareForGame()
|
||||
})
|
||||
it('Check Header', () => {
|
||||
cy.get('#HeaderText').should('contain','Hello, Linux World!').and('be.visible')
|
||||
cy.get('#HeaderText')
|
||||
.should('contain', 'Hello, Linux World!')
|
||||
.and('be.visible')
|
||||
cy.findByRole('link', { name: 'Bug Report' }).should('be.visible')
|
||||
cy.findByRole('button', { name: 'Sign Out' }).should('be.visible')
|
||||
})
|
||||
@@ -65,7 +95,11 @@ describe('example helloworld app', () => {
|
||||
cy.get($cmdlist).should('be.visible')
|
||||
cy.get('svg[data-icon="list"]').should('be.visible')
|
||||
cy.CheckTextElement('#CommandBook', '指令之書', 'Command Cheatsheets')
|
||||
cy.CheckTextElement('#cheatsheets','-- --指令列表-- --','--Command List--')
|
||||
cy.CheckTextElement(
|
||||
'#cheatsheets',
|
||||
'-- --指令列表-- --',
|
||||
'--Command List--'
|
||||
)
|
||||
})
|
||||
})
|
||||
it('Check Terminal', () => {
|
||||
|
||||
Reference in new issue
Block a user