From 6e55ace3b2e50511121578f40e718790f504541d Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 15 Oct 2026 17:43:49 +0000 Subject: [PATCH] Fix TeamAccessTab test for allowedDomainsCheckbox data-testid. Allowed domains is not gated on INVITE_USER; the previous assertion only passed because the test id never reached the DOM before the Compass migration. Co-authored-by: Matthew Birtch --- .../team_access_tab/team_access_tab.test.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/webapp/channels/src/components/team_settings/team_access_tab/team_access_tab.test.tsx b/webapp/channels/src/components/team_settings/team_access_tab/team_access_tab.test.tsx index 58c167c47ec..d5b36629813 100644 --- a/webapp/channels/src/components/team_settings/team_access_tab/team_access_tab.test.tsx +++ b/webapp/channels/src/components/team_settings/team_access_tab/team_access_tab.test.tsx @@ -80,11 +80,11 @@ describe('components/TeamSettings', () => { expect(baseActions.regenerateTeamInviteId).toHaveBeenCalledWith(defaultProps.team?.id); }); - test('should not render allowed domains checkbox if no permissions for team inviting', () => { - const props = {...defaultProps, canInviteTeamMembers: false}; - renderWithContext(); - const allowedDomainsCheckbox = screen.queryByTestId('allowedDomainsCheckbox'); - expect(allowedDomainsCheckbox).toBeNull(); + test('should still render allowed domains checkbox if no permissions for team inviting', () => { + // Allowed domains is independent of INVITE_USER; only the invite section is gated. + renderWithContext(); + expect(screen.getByTestId('allowedDomainsCheckbox')).toBeInTheDocument(); + expect(screen.queryByTestId('teamInviteContainer')).toBeNull(); }); test('should not show allowed domains input if allowed domains is empty', () => {