diff --git a/app/views/admin/invitations/index.html.erb b/app/views/admin/invitations/index.html.erb index e31955f82..666c522c0 100644 --- a/app/views/admin/invitations/index.html.erb +++ b/app/views/admin/invitations/index.html.erb @@ -55,7 +55,7 @@ - + > @@ -83,6 +83,16 @@ + <% if @invitations.empty? %> +
+

No members invited yet.

+

Invite members and grow your community.

+
+
+ <%= link_to "Invite member", new_admin_invitation_path, class: "c-cta c-cta--branded ml-3" %> +
+ <% end %> +
<%= paginate @invitations, theme: "admin", scope: @invitations, label: "Paginate invitations", context: "bottom" %> diff --git a/cypress/integration/seededFlows/adminFlows/users/invitedUsers.spec.js b/cypress/integration/seededFlows/adminFlows/users/invitedUsers.spec.js index 9ee310312..a06d83610 100644 --- a/cypress/integration/seededFlows/adminFlows/users/invitedUsers.spec.js +++ b/cypress/integration/seededFlows/adminFlows/users/invitedUsers.spec.js @@ -135,3 +135,17 @@ describe('Invited users', () => { cy.findByRole('button', { name: 'Cancel invite' }).click(); }; }); + +describe('No invited members', () => { + beforeEach(() => { + cy.testSetup(); + cy.fixture('users/adminUser.json').as('user'); + cy.get('@user').then((user) => { + cy.loginAndVisit(user, '/admin/member_manager/invitations'); + }); + }); + + it('displays an empty state', () => { + cy.findByText('No members invited yet.').should('exist'); + }); +});