diff --git a/.github/workflows/cucumber-tests.yml b/.github/workflows/cucumber-tests.yml index 824f5ff3..ed40f6a6 100644 --- a/.github/workflows/cucumber-tests.yml +++ b/.github/workflows/cucumber-tests.yml @@ -20,7 +20,7 @@ jobs: with: ruby-version: '3.2.0' - name: Cache gems - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: vendor/bundle key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} diff --git a/staff_features/agents/step_definitions/agent_delete.rb b/staff_features/agents/step_definitions/agent_delete.rb index 35abc659..7a75d5dc 100644 --- a/staff_features/agents/step_definitions/agent_delete.rb +++ b/staff_features/agents/step_definitions/agent_delete.rb @@ -1,26 +1,5 @@ # frozen_string_literal: true -When 'the user filters by text with the Agent name' do - fill_in 'Filter by text', with: @uuid - - find('#filter-text').send_keys(:enter) - - rows = [] - checks = 0 - - while checks < 5 - checks += 1 - - begin - rows = all('tr', text: @uuid) - rescue Selenium::WebDriver::Error::JavascriptError - sleep 1 - end - - break if rows.length == 1 - end -end - When 'the user checks the checkbox of the Agent' do find('#multiselect-item').check end diff --git a/staff_features/agents/step_definitions/agent_shared.rb b/staff_features/agents/step_definitions/agent_shared.rb deleted file mode 100644 index 25d4d372..00000000 --- a/staff_features/agents/step_definitions/agent_shared.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -Given 'an Agent has been created' do - visit "#{STAFF_URL}/agents/agent_person/new" - - fill_in 'Primary Part of Name', with: @uuid - - click_on 'Save' - - expect(find('.alert.alert-success.with-hide-alert').text).to eq 'Agent Created' - - url_parts = current_url.split('agents/agent_person').pop.split('/') - url_parts.pop - @agent_id = url_parts.pop -end diff --git a/staff_features/agents/step_definitions/agent_view.rb b/staff_features/agents/step_definitions/agent_view.rb index bfe4f3df..c7de940b 100644 --- a/staff_features/agents/step_definitions/agent_view.rb +++ b/staff_features/agents/step_definitions/agent_view.rb @@ -142,5 +142,5 @@ end Then 'the Agent view page is displayed' do - expect(find('h2').text).to eq "#{@uuid} Agent" + expect(find('h2').text).to eq "Agent #{@uuid} Agent" end diff --git a/staff_features/subjects/step_definitions/subject_import.rb b/staff_features/subjects/step_definitions/subject_import.rb index 7b5c1af5..56de3ecd 100644 --- a/staff_features/subjects/step_definitions/subject_import.rb +++ b/staff_features/subjects/step_definitions/subject_import.rb @@ -1,11 +1,5 @@ # frozen_string_literal: true -When 'the user clicks on the gear icon' do - within '.repo-container' do - find('.btn.btn-default.navbar-btn.dropdown-toggle').click - end -end - When 'the user checks {string} in the LCNAF Import form' do |string| elements = all(:css, "div[class*='radio']")