Commit a86108e0 authored by Tetiana Chupryna's avatar Tetiana Chupryna

Merge branch '335654-invite-members-trigger-js-error-on-empty-projects-page' into 'master'

Add trigger_source for view empty project page event

See merge request gitlab-org/gitlab!66083
parents 40f65208 938003e8
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
.js-invite-members-trigger{ data: { variant: 'confirm', .js-invite-members-trigger{ data: { variant: 'confirm',
classes: 'gl-mb-8 gl-xs-w-full', classes: 'gl-mb-8 gl-xs-w-full',
display_text: s_('InviteMember|Invite members'), display_text: s_('InviteMember|Invite members'),
trigger_source: 'project-empty-page',
event: 'click_button', event: 'click_button',
label: 'invite_members_empty_project' } } label: 'invite_members_empty_project' } }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
= render "home_panel" = render "home_panel"
= render "archived_notice", project: @project = render "archived_notice", project: @project
= render "invite_members" if can_import_members? = render 'invite_members_empty_project' if can_import_members?
%h4.gl-mt-0.gl-mb-3 %h4.gl-mt-0.gl-mb-3
= _('The repository for this project is empty') = _('The repository for this project is empty')
......
...@@ -64,6 +64,7 @@ RSpec.describe 'projects/empty' do ...@@ -64,6 +64,7 @@ RSpec.describe 'projects/empty' do
expect(rendered).to have_selector('.js-invite-members-modal') expect(rendered).to have_selector('.js-invite-members-modal')
expect(rendered).to have_selector('[data-label=invite_members_empty_project]') expect(rendered).to have_selector('[data-label=invite_members_empty_project]')
expect(rendered).to have_selector('[data-event=click_button]') expect(rendered).to have_selector('[data-event=click_button]')
expect(rendered).to have_selector('[data-trigger-source=project-empty-page]')
end end
context 'when user does not have permissions to invite members' do context 'when user does not have permissions to invite members' do
......
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