Commit d22ac2bf authored by Martin Wortschack's avatar Martin Wortschack

Merge branch...

Merge branch '281820-convert-project-members-list-view-from-haml-to-vue-update-feature-specs-and-qa-e2e-specs-2' into 'master'

Update QA E2E specs to reflect vue_project_members_list feature flag

See merge request gitlab-org/gitlab!53080
parents 035285ba cd0a067d
...@@ -31,6 +31,7 @@ export default { ...@@ -31,6 +31,7 @@ export default {
:title="$options.i18n.buttonTitle" :title="$options.i18n.buttonTitle"
:aria-label="$options.i18n.buttonTitle" :aria-label="$options.i18n.buttonTitle"
icon="remove" icon="remove"
data-qa-selector="delete_group_access_link"
@click="showRemoveGroupLinkModal(groupLink)" @click="showRemoveGroupLinkModal(groupLink)"
/> />
</template> </template>
...@@ -52,6 +52,7 @@ export default { ...@@ -52,6 +52,7 @@ export default {
:action-primary="$options.actionPrimary" :action-primary="$options.actionPrimary"
:action-cancel="$options.actionCancel" :action-cancel="$options.actionCancel"
size="sm" size="sm"
data-qa-selector="remove_group_link_modal_content"
@primary="handlePrimary" @primary="handlePrimary"
@hide="hideRemoveGroupLinkModal" @hide="hideRemoveGroupLinkModal"
> >
......
...@@ -11,10 +11,6 @@ module QA ...@@ -11,10 +11,6 @@ module QA
element :invite_member_button element :invite_member_button
end end
view 'app/views/projects/project_members/_team.html.haml' do
element :members_list
end
view 'app/views/projects/project_members/index.html.haml' do view 'app/views/projects/project_members/index.html.haml' do
element :invite_group_tab element :invite_group_tab
element :groups_list_tab element :groups_list_tab
...@@ -25,11 +21,18 @@ module QA ...@@ -25,11 +21,18 @@ module QA
element :invite_group_button element :invite_group_button
end end
view 'app/views/shared/members/_group.html.haml' do view 'app/assets/javascripts/pages/projects/project_members/index.js' do
element :group_row element :group_row
end
view 'app/assets/javascripts/members/components/action_buttons/remove_group_link_button.vue' do
element :delete_group_access_link element :delete_group_access_link
end end
view 'app/assets/javascripts/members/components/modals/remove_group_link_modal.vue' do
element :remove_group_link_modal_content
end
def select_group(group_name) def select_group(group_name)
click_element :group_select_field click_element :group_select_field
search_and_select(group_name) search_and_select(group_name)
...@@ -50,10 +53,13 @@ module QA ...@@ -50,10 +53,13 @@ module QA
def remove_group(group_name) def remove_group(group_name)
click_element :invite_group_tab click_element :invite_group_tab
click_element :groups_list_tab click_element :groups_list_tab
page.accept_alert do
within_element(:group_row, text: group_name) do within_element(:group_row, text: group_name) do
click_element :delete_group_access_link click_element :delete_group_access_link
end end
within_element(:remove_group_link_modal_content) do
click_button 'Remove group'
end end
end end
end end
......
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
RSpec.describe 'Manage' do RSpec.describe 'Manage', :requires_admin do
describe 'Add project member' do describe 'Add project member' do
before do
Runtime::Feature.enable('vue_project_members_list')
end
after do
Runtime::Feature.disable('vue_project_members_list')
end
it 'user adds project member', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/482' do it 'user adds project member', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/482' do
Flow::Login.sign_in Flow::Login.sign_in
...@@ -16,7 +24,7 @@ module QA ...@@ -16,7 +24,7 @@ module QA
Page::Project::Members.perform do |members| Page::Project::Members.perform do |members|
members.add_member(user.username) members.add_member(user.username)
expect(members).to have_content(/@#{user.username}( Is using seat)?(\n| )?Given access/) expect(members).to have_content("@#{user.username}")
end end
end end
end end
......
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
RSpec.describe 'Plan', :orchestrated, :smtp do RSpec.describe 'Plan', :orchestrated, :smtp, :requires_admin do
describe 'Email Notification' do describe 'Email Notification' do
include Support::Api include Support::Api
...@@ -16,9 +16,14 @@ module QA ...@@ -16,9 +16,14 @@ module QA
end end
before do before do
Runtime::Feature.enable('vue_project_members_list', project: project)
Flow::Login.sign_in Flow::Login.sign_in
end end
after do
Runtime::Feature.disable('vue_project_members_list', project: project)
end
it 'is received by a user for project invitation', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/676' do it 'is received by a user for project invitation', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/676' do
project.visit! project.visit!
...@@ -27,7 +32,7 @@ module QA ...@@ -27,7 +32,7 @@ module QA
member_settings.add_member(user.username) member_settings.add_member(user.username)
end end
expect(page).to have_content(/@#{user.username}(\n| )?Given access/) expect(page).to have_content("@#{user.username}")
mailhog_items = mailhog_json.dig('items') mailhog_items = mailhog_json.dig('items')
......
...@@ -100,8 +100,10 @@ module QA ...@@ -100,8 +100,10 @@ module QA
it_behaves_like 'audit event', ['Added user access as Guest', 'Changed access level', 'Removed user access'] it_behaves_like 'audit event', ['Added user access as Guest', 'Changed access level', 'Removed user access']
end end
context 'Add and remove project access', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/735' do context 'Add and remove project access', :requires_admin, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/735' do
before do before do
Runtime::Feature.enable('vue_project_members_list', project: project)
sign_in sign_in
project.visit! project.visit!
...@@ -118,6 +120,10 @@ module QA ...@@ -118,6 +120,10 @@ module QA
group.visit! group.visit!
end end
after do
Runtime::Feature.disable('vue_project_members_list', project: project)
end
it_behaves_like 'audit event', ['Added project access', 'Removed project access'] it_behaves_like 'audit event', ['Added project access', 'Removed project access']
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment