ita-social-projects / Forum

Forum Repository for the development of Python project
MIT License
8 stars 3 forks source link

Log in #2

Open mehalyna opened 1 year ago

mehalyna commented 1 year ago

As a registered user I want to log in to the website So that I can access my private information

The log in page has the following elements:

  1. Email address field
  2. Password field
  3. 'Увійти' button
  4. 'Головна' button
  5. Вперше на нашому сайті? "Зареєструватись" button Behavior: When the user clicks on the field it gets highlighted The button 'Увійти' is always active

Scenario 1: Successful login Given I am on the login page When I enter email address And I enter password And I click the button 'Увійти' Then after validation the user is redirected to the main page

Scenario 2: Unsuccessful login (email address format is incorrect) Given I am on the login page When I enter email address And I enter password And I click the button 'Увійти' Then after validation I see the error message "Формат електронної адреси некоректний"

Scenario 3: Unsuccessful login (email address or password are not valid) Given I am on the login page When I enter email address And I enter password And I click the button 'Увійти' Then after validation I see the error message "Електронна пошта чи пароль вказані некоректно"

Scenario 4: Unsuccessful login (user enters only one field, either email or password) Given I am on the login page When I enter email and not enter password Or I enter password and not enter email And I click the button 'Увійти' Then after validation I see the error message "Обов'язкове поле"

Scenario 5: User realizes that they don't have the account yet Given I am on the login page When I click on 'Зареєструватись' button Then I am redirected to the Registration page

Scenario 6: User wants to return to the Main page Given I am on the login page When I click on 'Головна' button Then I am redirected to the Main page

Design - link Linked epic: #4

oksanahorishna commented 1 year ago

Scenario: user enters only one field (either email or password) Given the user is on the login page When the user enters email Or the user enters password And clicks the button 'Log in' Then after validation the user sees the general error message (reason is not specified)

can we reuse the same error? or another one should be created?

mehalyna commented 8 months ago

377

378

NataliiaMaistruk commented 1 month ago

Disable 'Увійти' 'Зареєструватись' buttons https://github.com/ita-social-projects/Forum/issues/125