Fix rubocop warnings

approved
(Bruce Becker) #1

Fix rubocop warnings

From 6846ac0e9b1526d9b7629e7fc0a7de7e93ad31c9 Mon Sep 17 00:00:00 2001
From: Bruce Becker <brucellino@gmail.com>
Date: Wed, 10 Oct 2018 10:52:23 +0200
Subject: [PATCH] Fix rubocop warnings


diff --git a/Gemfile b/Gemfile
index 10bfe0f..cbf6eaf 100644
--- a/Gemfile
+++ b/Gemfile
@@ -5,9 +5,9 @@ gem 'inspec'
 gem 'json'
 
 group :test do
+  gem 'cucumber', '~> 3.1.0'
   gem 'rspec'
   gem 'rubocop'
-  gem 'cucumber', '~> 3.1.0'
+  gem 'selenium-webdriver', '~> 3.14'
   gem 'watir'
-  gem "selenium-webdriver", "~> 3.14"
-end
\ No newline at end of file
+end
diff --git a/tests/cucumber/features/step_definitions/stepdefs.rb b/tests/cucumber/features/step_definitions/stepdefs.rb
index a129993..c6d7175 100644
--- a/tests/cucumber/features/step_definitions/stepdefs.rb
+++ b/tests/cucumber/features/step_definitions/stepdefs.rb
@@ -68,17 +68,16 @@ Then('I am asked to release my attributes') do
   @browser.window(title: 'Information Release').use
   expect(@browser.span(class: 'service_name')).to exist
   expect(@browser.span(class: 'service_name').text)
-  .to match(/EGI AAI Service Provider Proxy/)
+    .to match(/EGI AAI Service Provider Proxy/)
 
   expect(@browser.span(class: 'service_description')).to exist
   expect(@browser.span(class: 'service_description').text)
-  .to match(/Service provider proxy for all federated EGI services/)
+    .to match(/Service provider proxy for all federated EGI services/)
 
   # give consent to the proxy one time
   @browser.radio(value: '_shib_idp_doNotRememberConsent').set
   @browser.button(name: '_eventId_proceed', value: 'Accept').click
 
-  
   @browser.window(title: /consent/i).use
   # say yes to give consent
   @browser.button(text: /yes/i).click
@@ -91,9 +90,9 @@ Then('I am asked to release my attributes') do
   # 1) Accept to sign up
   # 2) read terms and conditions, then accept
   # 3) sign up
-  # 4) get email to click on https://aai.egi.eu/registry/co_invites/reply/<big_hash>
+  # 4) get email to click on
+  # https://aai.egi.eu/registry/co_invites/reply/<big_hash>
   # 5) confirm : https://aai.egi.eu/registry/co_invites/authconfirm/<big_hash>
-
 end
 
 Then('I am taken back to the main forum') do
@@ -103,12 +102,15 @@ Then('I am taken back to the main forum') do
   expect(@browser.div(id: 'discourse-modal')).to exist
 end
 
-Then("I can see my profile information") do
+Then('I can see my profile information') do
   # check for login fields
   # expect(@browser.div(class: 'login-form')).to exist
-  expect(@browser.text_field(id: 'new-account-email').value).to eq('test@community.egi.eu')
-  expect(@browser.text_field(id: 'new-account-username').value).to eq('Dr_Test_Robot')
-  expect(@browser.text_field(id: 'new-account-name').value).to eq('Dr Test Robot')
+  expect(@browser.text_field(id: 'new-account-email').value)
+    .to eq('test@community.egi.eu')
+  expect(@browser.text_field(id: 'new-account-username').value)
+    .to eq('Dr_Test_Robot')
+  expect(@browser.text_field(id: 'new-account-name').value)
+    .to eq('Dr Test Robot')
 end
 
 After do

GitHub