Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-30 15:08:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-30 15:08:43 +0300
commite99d2e196cd87ed071f856f80ae085c7be640876 (patch)
tree9caaeb14cc4997180b480f1a22600abd5f92ac06 /spec/support/shared_examples
parent14846d722eb52ea70bc3092eb5da80ce1c2e9750 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples')
-rw-r--r--spec/support/shared_examples/features/deploy_token_shared_examples.rb24
1 files changed, 12 insertions, 12 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 79ad5bd6c7f..9fe08e5c996 100644
--- a/spec/support/shared_examples/features/deploy_token_shared_examples.rb
+++ b/spec/support/shared_examples/features/deploy_token_shared_examples.rb
@@ -14,32 +14,32 @@ RSpec.shared_examples 'a deploy token in settings' do
end
end
- it 'add a new deploy token' do
+ it 'add a new deploy token', :js do
visit page_path
- fill_in 'deploy_token_name', with: 'new_deploy_key'
- fill_in 'deploy_token_expires_at', with: (Date.today + 1.month).to_s
- fill_in 'deploy_token_username', with: 'deployer'
- check 'deploy_token_read_repository'
- check 'deploy_token_read_registry'
+ fill_in _('Name'), with: 'new_deploy_key'
+ fill_in _('Expiration date (optional)'), with: (Date.today + 1.month).to_s
+ fill_in _('Username (optional)'), with: 'deployer'
+ check 'read_repository'
+ check 'read_registry'
click_button 'Create deploy token'
expect(page).to have_content("Your new #{entity_type} deploy token has been created")
within('.created-deploy-token-container') do
- expect(page).to have_selector("input[name='deploy-token-user'][value='deployer']")
- expect(page).to have_selector("input[name='deploy-token'][readonly='readonly']")
+ expect(find("input[name='deploy-token-user']").value).to eq("deployer")
+ expect(find("input[name='deploy-token'][readonly='readonly']")).to be_visible
end
- expect(find("input#deploy_token_name").value).to eq nil
+ expect(find("input#deploy_token_name").value).to be_empty
expect(find("input#deploy_token_read_repository").checked?).to eq false
end
- context "with form errors" do
+ context "with form errors", :js do
before do
visit page_path
- fill_in "deploy_token_name", with: "new_deploy_key"
- fill_in "deploy_token_username", with: "deployer"
+ fill_in _('Name'), with: "new_deploy_key"
+ fill_in _('Username (optional)'), with: "deployer"
click_button "Create deploy token"
end