diff options
Diffstat (limited to 'spec/support/shared_examples/features/deploy_token_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/features/deploy_token_shared_examples.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/support/shared_examples/features/deploy_token_shared_examples.rb b/spec/support/shared_examples/features/deploy_token_shared_examples.rb index 80f5f1d805c..b621a0c8cca 100644 --- a/spec/support/shared_examples/features/deploy_token_shared_examples.rb +++ b/spec/support/shared_examples/features/deploy_token_shared_examples.rb @@ -6,7 +6,7 @@ RSpec.shared_examples 'a deploy token in settings' do visit page_path - within('.deploy-tokens') do + within('#js-deploy-tokens') do expect(page).to have_content(deploy_token.name) expect(page).to have_content('read_repository') expect(page).to have_content('read_registry') @@ -16,6 +16,7 @@ RSpec.shared_examples 'a deploy token in settings' do it 'add a new deploy token', :js do visit page_path + click_button "Add token" within('#js-deploy-tokens') do fill_in _('Name'), with: 'new_deploy_key' @@ -28,7 +29,7 @@ RSpec.shared_examples 'a deploy token in settings' do expect(page).to have_content("Your new #{entity_type} deploy token has been created") - within('.created-deploy-token-container') do + within('#new-deploy-token-alert') do expect(find("input[name='deploy-token-user']").value).to eq("deployer") expect(find("input[name='deploy-token'][readonly='readonly']")).to be_visible end @@ -40,6 +41,7 @@ RSpec.shared_examples 'a deploy token in settings' do context "with form errors", :js do before do visit page_path + click_button "Add token" fill_in _('Name'), with: "new_deploy_key" fill_in _('Username (optional)'), with: "deployer" click_button "Create deploy token" @@ -63,7 +65,7 @@ RSpec.shared_examples 'a deploy token in settings' do it 'shows absolute times for expires_at' do visit page_path - within('.deploy-tokens') do + within('#js-deploy-tokens') do expect(page).to have_content(deploy_token.expires_at.strftime('%b %-d')) end end |