Нужно проверить UI через гем cucumber, а именно то что старница регистрации открывается и создается пользователь при заполнении всех данных, нужно:
1) Создать файл features/new_session.feature
Feature: Session
Scenario: I can create new session on site
Given I visit on sigin page
When I fill email and password and submit form
Then I should redirect to projects path and see a new session welcome message
2) Создать файл features/step_definitions/new_session_steps.rb
Given("I visit on sigin page") do
# FactoryBot.create(:user, email: 'test@test.com', password: 'password')
#visit new_user_session_path
end
When("I fill email and password and submit form") do
fill_in 'user_email', with: 'test@test.com'
fill_in 'user_password', with: 'password'
click_on 'user_signin_submit'
end
Then("I should redirect to projects path and see a new session welcome message") do
# expect(page).to have_content(I18n.t('devise.sessions.signed_in'))
end
Нужно проверить UI через гем cucumber, а именно то что старница регистрации открывается и создается пользователь при заполнении всех данных, нужно:
1) Создать файл features/new_session.feature
2) Создать файл features/step_definitions/new_session_steps.rb
3) Проверить тесты запустив feeature в консоле