Skip to content

Commit

Permalink
Revert "Appease the cops"
Browse files Browse the repository at this point in the history
This reverts commit 18b71b9.
  • Loading branch information
bp-karl committed Jan 9, 2024
1 parent 333984d commit 19aa914
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
mock_valid_google_oauth(hd: 'example.org', email: 'bob@example.org')

visit sign_in_path
click_on 'Sign in with Google'
click_button 'Sign in with Google'

expect_user_to_be_signed_in
end
Expand Down
8 changes: 4 additions & 4 deletions spec/features/authentication/oauth/visitor_signs_up_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
mock_valid_google_oauth(hd: 'example.org', email: 'bob@example.org')

visit sign_in_path
click_on 'Sign in with Google'
click_button 'Sign in with Google'

expect_user_to_be_signed_in
end
Expand All @@ -18,7 +18,7 @@

visit sign_in_path

expect { click_on 'Sign in with Google' }.to raise_error(ActiveRecord::RecordNotFound)
expect { click_button 'Sign in with Google' }.to raise_error(ActiveRecord::RecordNotFound)
end

it 'returns error 404 if hosted domain is unavailable in oauth hash' do
Expand All @@ -27,7 +27,7 @@

visit sign_in_path

expect { click_on 'Sign in with Google' }.to raise_error(ActiveRecord::RecordNotFound)
expect { click_button 'Sign in with Google' }.to raise_error(ActiveRecord::RecordNotFound)
end

it 'returns error 404 if email is unavailable in oauth hash' do
Expand All @@ -36,6 +36,6 @@

visit sign_in_path

expect { click_on 'Sign in with Google' }.to raise_error(ActiveRecord::RecordNotFound)
expect { click_button 'Sign in with Google' }.to raise_error(ActiveRecord::RecordNotFound)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
it 'by navigating to the page' do
visit sign_in_path

click_on I18n.t('sessions.form.forgot_password')
click_link I18n.t('sessions.form.forgot_password')

expect(page).to have_current_path new_password_path, ignore_query: true
end
Expand Down
2 changes: 1 addition & 1 deletion spec/features/authentication/visitor_signs_up_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
it 'by navigating to the page' do
visit sign_in_path

click_on I18n.t('sessions.form.sign_up')
click_link I18n.t('sessions.form.sign_up')

expect(page).to have_current_path sign_up_path, ignore_query: true
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ def visit_password_reset_page_for(user)

def change_password_to(password)
fill_in 'password_reset_password', with: password
click_on I18n.t('helpers.submit.password_reset.submit')
click_button I18n.t('helpers.submit.password_reset.submit')
end
end
8 changes: 4 additions & 4 deletions spec/features/manager_creates_a_pipeline_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
expect(page).to have_text 'Pipeline was successfully created'
expect(page).to have_text 'My Pipeline'

click_on 'Edit'
click_link 'Edit'
expect(page).to have_select('Base dyno type', selected: 'Basic')
expect(page).to have_select('Boost dyno type', selected: 'Standard-1X')
expect(page).to have_checked_field('Set env variable')
Expand All @@ -29,7 +29,7 @@
visit new_pipeline_path(as: create(:user, :manager))
fill_in 'API key', with: '75ed542b-271b-44be-99c4-3f282e3f3d8d'
fill_in 'UUID', with: 'invalid-uuid'
click_on 'Create Pipeline'
click_button 'Create Pipeline'

expect(page).to have_text 'Uuid is invalid'
end
Expand All @@ -40,7 +40,7 @@
visit new_pipeline_path(as: create(:user, :manager))
fill_in 'API key', with: 'invalid-api-key'
fill_in 'UUID', with: '462c0eac-7680-4682-bf01-f1748d5f6919'
click_on 'Create Pipeline'
click_button 'Create Pipeline'

expect(page).to have_text 'Api key is invalid'
end
Expand All @@ -59,7 +59,7 @@ def create_pipeline(name: Faker::App.name)
select 'Standard-1X', from: 'Boost dyno type'
check 'Set env variable'

click_on 'Create Pipeline'
click_button 'Create Pipeline'
end

def stub_pipeline_info(uuid:, api_key:, name:)
Expand Down
4 changes: 2 additions & 2 deletions spec/features/manager_destroys_a_pipeline_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
user = create(:user, :manager, organisation: pipeline.organisation)

visit pipeline_path(pipeline, as: user)
click_on 'Destroy this pipeline'
click_button 'Destroy this pipeline'

expect(page).to have_content('Pipeline was successfully destroyed.')
expect(page).to have_no_text 'dde075f6-c764-11ed-afa1-0242ac120002'
expect(page).not_to have_text 'dde075f6-c764-11ed-afa1-0242ac120002'
end
end
6 changes: 3 additions & 3 deletions spec/features/manager_edits_a_pipeline_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
user = create(:user, :manager, organisation: pipeline.organisation)

visit pipeline_path(pipeline, as: user)
click_on 'Edit'
click_link 'Edit'

select 'Basic', from: 'Base dyno type'
select 'Standard-1X', from: 'Boost dyno type'
uncheck 'Set env variable'

click_on 'Update Pipeline'
click_button 'Update Pipeline'
expect(page).to have_text 'Pipeline was successfully updated'

click_on 'Edit'
click_link 'Edit'
expect(page).to have_select('Base dyno type', selected: 'Basic')
expect(page).to have_select('Boost dyno type', selected: 'Standard-1X')
expect(page).to have_unchecked_field('Set env variable')
Expand Down
4 changes: 2 additions & 2 deletions spec/features/user_views_pipelines_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
visit pipelines_path(as: user)

expect(page).to have_text 'c961ec04-c764-11ed-afa1-0242ac120002'
expect(page).to have_no_text 'dde075f6-c764-11ed-afa1-0242ac120002'
expect(page).not_to have_text 'dde075f6-c764-11ed-afa1-0242ac120002'
end

it 'shows a list of review apps associated with the pipeline ordered by last_active_at' do
Expand Down Expand Up @@ -52,6 +52,6 @@
create(:review_app, pipeline:, branch: 'ke/annoyed_that_this_uses_sleep')

sleep Rails.application.config.x.polling_interval_seconds * 1.5
expect(page).to have_no_content('ke/annoyed_that_this_uses_sleep')
expect(page).not_to have_content('ke/annoyed_that_this_uses_sleep')
end
end
8 changes: 4 additions & 4 deletions spec/support/features/clearance_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module ClearanceHelpers
def reset_password_for(email)
visit new_password_path
fill_in 'password_email', with: email
click_on I18n.t('helpers.submit.password.submit')
click_button I18n.t('helpers.submit.password.submit')
end

def sign_in
Expand All @@ -18,19 +18,19 @@ def sign_in_with(email, password)
visit sign_in_path
fill_in 'session_email', with: email
fill_in 'session_password', with: password
click_on I18n.t('helpers.submit.session.submit')
click_button I18n.t('helpers.submit.session.submit')
end

def sign_out
click_on I18n.t('layouts.application.sign_out')
click_link I18n.t('layouts.application.sign_out')
end

def sign_up_with(email, password, organisation_name)
visit sign_up_path
fill_in 'new_user_form_email', with: email
fill_in 'new_user_form_password', with: password
fill_in 'new_user_form_organisation_name', with: organisation_name
click_on I18n.t('helpers.submit.user.create')
click_button I18n.t('helpers.submit.user.create')
end

def expect_user_to_be_signed_in
Expand Down

0 comments on commit 19aa914

Please sign in to comment.