From b629d527c0cfa1ad525d2ed7e4431c124286e483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Skwierczy=C5=84ski?= Date: Tue, 9 Apr 2024 12:25:15 +0200 Subject: [PATCH] chore: add toast test --- .../__tests__/membershipEntry.component.spec.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/webapp-libs/webapp-tenants/src/components/tenantMembersList/membershipEntry/__tests__/membershipEntry.component.spec.tsx b/packages/webapp-libs/webapp-tenants/src/components/tenantMembersList/membershipEntry/__tests__/membershipEntry.component.spec.tsx index 1b7a8c6d3..7e259862b 100644 --- a/packages/webapp-libs/webapp-tenants/src/components/tenantMembersList/membershipEntry/__tests__/membershipEntry.component.spec.tsx +++ b/packages/webapp-libs/webapp-tenants/src/components/tenantMembersList/membershipEntry/__tests__/membershipEntry.component.spec.tsx @@ -53,5 +53,7 @@ describe('MembershipEntry: Component', () => { await userEvent.click(screen.getByRole('button', { name: /Change role/i })); await userEvent.click(screen.getByRole('button', { name: /Member/i })); expect(requestMock.newData).toHaveBeenCalled(); + const toast = await screen.findByTestId('toast-1'); + expect(toast).toHaveTextContent('🎉 The user role was updated successfully!'); }); });