From b4b2688e084189420d014927deea04fdac94c8bb Mon Sep 17 00:00:00 2001 From: decabeza Date: Thu, 31 May 2018 18:58:33 +0200 Subject: [PATCH] Updates texts on specs --- spec/features/management/account_spec.rb | 11 ++----- .../management/budget_investments_spec.rb | 32 +++++++++---------- .../management/document_verifications_spec.rb | 12 +++---- .../management/email_verifications_spec.rb | 2 +- .../features/management/managed_users_spec.rb | 12 +++---- spec/features/management/users_spec.rb | 8 ++--- 6 files changed, 36 insertions(+), 41 deletions(-) diff --git a/spec/features/management/account_spec.rb b/spec/features/management/account_spec.rb index df1ca6efd..50e8e9ae4 100644 --- a/spec/features/management/account_spec.rb +++ b/spec/features/management/account_spec.rb @@ -12,7 +12,6 @@ feature 'Account' do visit management_root_path - click_link 'Edit user account' click_link 'Reset password via email' expect(page).to have_content "No verified user logged in yet" @@ -37,7 +36,6 @@ feature 'Account' do login_managed_user(user) visit management_root_path - click_link 'Edit user account' click_link 'Reset password via email' click_link 'Send reset password email' @@ -54,12 +52,11 @@ feature 'Account' do login_managed_user(user) visit management_root_path - click_link 'Edit user account' click_link 'Reset password manually' find(:css, "input[id$='user_password']").set("new_password") - click_button 'Save' + click_button 'Save password' expect(page).to have_content 'Password reseted successfully' @@ -75,13 +72,12 @@ feature 'Account' do login_managed_user(user) visit management_root_path - click_link 'Edit user account' click_link 'Reset password manually' click_link 'Generate random password' new_password = find_field('user_password').value - click_button 'Save' + click_button 'Save password' expect(page).to have_content 'Password reseted successfully' @@ -97,12 +93,11 @@ feature 'Account' do login_managed_user(user) visit management_root_path - click_link 'Edit user account' click_link 'Reset password manually' find(:css, "input[id$='user_password']").set("another_new_password") - click_button 'Save' + click_button 'Save password' expect(page).to have_content 'Password reseted successfully' expect(page).to have_css("a[href='javascript:window.print();']", text: 'Print password') diff --git a/spec/features/management/budget_investments_spec.rb b/spec/features/management/budget_investments_spec.rb index 7f0177393..9f0ca7938 100644 --- a/spec/features/management/budget_investments_spec.rb +++ b/spec/features/management/budget_investments_spec.rb @@ -19,7 +19,7 @@ feature 'Budget Investments' do click_link "Create budget investment" within "#budget_#{@budget.id}" do - click_link "Create New Investment" + click_link "Create budget investment" end within(".account-info") do @@ -69,10 +69,10 @@ feature 'Budget Investments' do user = create(:user, :level_two) login_managed_user(user) - click_link "Support Budget Investments" + click_link "Support budget investments" expect(page).to have_content(@budget.name) within "#budget_#{@budget.id}" do - click_link "Support Budget Investments" + click_link "Support budget investments" end fill_in "search", with: "what you got" @@ -96,10 +96,10 @@ feature 'Budget Investments' do user = create(:user, :level_two) login_managed_user(user) - click_link "Support Budget Investments" + click_link "Support budget investments" expect(page).to have_content(@budget.name) within "#budget_#{@budget.id}" do - click_link "Support Budget Investments" + click_link "Support budget investments" end fill_in "search", with: "Area 52" @@ -122,10 +122,10 @@ feature 'Budget Investments' do user = create(:user, :level_two) login_managed_user(user) - click_link "Support Budget Investments" + click_link "Support budget investments" expect(page).to have_content(@budget.name) within "#budget_#{@budget.id}" do - click_link "Support Budget Investments" + click_link "Support budget investments" end within(".account-info") do @@ -207,10 +207,10 @@ feature 'Budget Investments' do user = create(:user, :level_two) login_managed_user(user) - click_link "Support Budget Investments" + click_link "Support budget investments" expect(page).to have_content(@budget.name) within "#budget_#{@budget.id}" do - click_link "Support Budget Investments" + click_link "Support budget investments" end expect(page).to have_content(budget_investment.title) @@ -229,10 +229,10 @@ feature 'Budget Investments' do user = create(:user, :level_two) login_managed_user(user) - click_link "Support Budget Investments" + click_link "Support budget investments" expect(page).to have_content(@budget.name) within "#budget_#{@budget.id}" do - click_link "Support Budget Investments" + click_link "Support budget investments" end within("#budget-investments") do @@ -250,7 +250,7 @@ feature 'Budget Investments' do user = create(:user) login_managed_user(user) - click_link "Support Budget Investments" + click_link "Support budget investments" expect(page).to have_content "User is not verified" end @@ -261,11 +261,11 @@ feature 'Budget Investments' do scenario 'Printing budget investments' do 16.times { create(:budget_investment, budget: @budget, heading: @heading) } - click_link "Print Budget Investments" + click_link "Print budget investments" expect(page).to have_content(@budget.name) within "#budget_#{@budget.id}" do - click_link "Print Budget Investments" + click_link "Print budget investments" end expect(page).to have_css('.budget-investment', count: 15) @@ -283,11 +283,11 @@ feature 'Budget Investments' do user = create(:user, :level_two) login_managed_user(user) - click_link "Print Budget Investments" + click_link "Print budget investments" expect(page).to have_content(@budget.name) within "#budget_#{@budget.id}" do - click_link "Print Budget Investments" + click_link "Print budget investments" end within '#budget-investments' do diff --git a/spec/features/management/document_verifications_spec.rb b/spec/features/management/document_verifications_spec.rb index ebde442d8..f9e2c20cc 100644 --- a/spec/features/management/document_verifications_spec.rb +++ b/spec/features/management/document_verifications_spec.rb @@ -11,7 +11,7 @@ feature 'DocumentVerifications' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: user.document_number - click_button 'Check' + click_button 'Check document' expect(page).to have_content "already verified" end @@ -22,7 +22,7 @@ feature 'DocumentVerifications' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: user.document_number - click_button 'Check' + click_button 'Check document' expect(page).to have_content "Vote proposals" @@ -39,7 +39,7 @@ feature 'DocumentVerifications' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: "inexisting" - click_button 'Check' + click_button 'Check document' expect(page).to have_content "This document is not registered" end @@ -48,7 +48,7 @@ feature 'DocumentVerifications' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: '12345678Z' - click_button 'Check' + click_button 'Check document' expect(page).to have_content "Please introduce the email used on the account" end @@ -57,7 +57,7 @@ feature 'DocumentVerifications' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: '12345 - h' - click_button 'Check' + click_button 'Check document' expect(page).to have_content "Document number: 12345H" end @@ -67,7 +67,7 @@ feature 'DocumentVerifications' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: '12345678Z' - click_button 'Check' + click_button 'Check document' expect(page).to have_content "You don't have the required age to verify your account." end diff --git a/spec/features/management/email_verifications_spec.rb b/spec/features/management/email_verifications_spec.rb index a5bd4d40e..56997f140 100644 --- a/spec/features/management/email_verifications_spec.rb +++ b/spec/features/management/email_verifications_spec.rb @@ -9,7 +9,7 @@ feature 'EmailVerifications' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: '12345678Z' - click_button 'Check' + click_button 'Check document' expect(page).to have_content "Please introduce the email used on the account" diff --git a/spec/features/management/managed_users_spec.rb b/spec/features/management/managed_users_spec.rb index 3bd429e0f..dfd638b6c 100644 --- a/spec/features/management/managed_users_spec.rb +++ b/spec/features/management/managed_users_spec.rb @@ -18,7 +18,7 @@ feature 'Managed User' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: user.document_number - click_button 'Check' + click_button 'Check document' expect(page).to have_content "already verified" @@ -35,7 +35,7 @@ feature 'Managed User' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: user.document_number - click_button 'Check' + click_button 'Check document' expect(page).to have_content "Vote proposals" @@ -58,7 +58,7 @@ feature 'Managed User' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: '12345678Z' - click_button 'Check' + click_button 'Check document' within(".account-info") do expect(page).not_to have_content "Identified as" @@ -89,7 +89,7 @@ feature 'Managed User' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: '12345678Z' - click_button 'Check' + click_button 'Check document' expect(page).to have_content "Please introduce the email used on the account" @@ -117,7 +117,7 @@ feature 'Managed User' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: '12345678Z' - click_button 'Check' + click_button 'Check document' expect(page).to have_content "Please introduce the email used on the account" @@ -145,7 +145,7 @@ feature 'Managed User' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: user.document_number - click_button 'Check' + click_button 'Check document' expect(page).to have_content "already verified" diff --git a/spec/features/management/users_spec.rb b/spec/features/management/users_spec.rb index 2cd6ff980..5cba5411c 100644 --- a/spec/features/management/users_spec.rb +++ b/spec/features/management/users_spec.rb @@ -9,7 +9,7 @@ feature 'Users' do scenario 'Create a level 3 user with email from scratch' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: '12345678Z' - click_button 'Check' + click_button 'Check document' expect(page).to have_content "Please introduce the email used on the account" @@ -49,7 +49,7 @@ feature 'Users' do scenario 'Create a level 3 user without email from scratch' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: '12345678Z' - click_button 'Check' + click_button 'Check document' expect(page).to have_content "Please introduce the email used on the account" @@ -77,7 +77,7 @@ feature 'Users' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: '12345678Z' - click_button 'Check' + click_button 'Check document' expect(page).not_to have_content "This user account is already verified." expect(page).to have_content "This user can participate in the website with the following permissions" @@ -91,7 +91,7 @@ feature 'Users' do visit management_document_verifications_path fill_in 'document_verification_document_number', with: '12345678Z' - click_button 'Check' + click_button 'Check document' expect(page).to have_content "no user account associated to it" end