diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/features/projects/fork_spec.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/features/projects/fork_spec.rb')
-rw-r--r-- | spec/features/projects/fork_spec.rb | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/spec/features/projects/fork_spec.rb b/spec/features/projects/fork_spec.rb index 3867f7fd086..8b484141a95 100644 --- a/spec/features/projects/fork_spec.rb +++ b/spec/features/projects/fork_spec.rb @@ -3,6 +3,7 @@ require 'spec_helper' RSpec.describe 'Project fork', feature_category: :projects do + include ListboxHelpers include ProjectForksHelper let(:user) { create(:user) } @@ -137,10 +138,9 @@ RSpec.describe 'Project fork', feature_category: :projects do let(:user) { create(:group_member, :maintainer, user: create(:user), group: group).user } def submit_form(group_obj = group) - find('[data-testid="select_namespace_dropdown"]').click - find('[data-testid="select_namespace_dropdown_search_field"]').fill_in(with: group_obj.name) - click_button group_obj.name - + click_button(s_('ForkProject|Select a namespace')) + send_keys group_obj.name + select_listbox_item(group_obj.name) click_button 'Fork project' end @@ -151,6 +151,13 @@ RSpec.describe 'Project fork', feature_category: :projects do expect(page).to have_content 'Forked from' end + it 'redirects to the source project when cancel is clicked' do + visit new_project_fork_path(project) + click_on 'Cancel' + + expect(page).to have_current_path(project_path(project)) + end + it 'shows the new forked project on the forks page' do visit new_project_fork_path(project) submit_form |