Skip to content

Commit

Permalink
fix: Coherent organization naming
Browse files Browse the repository at this point in the history
  • Loading branch information
mkleszcz committed May 17, 2024
1 parent 6127c1c commit bf5dea8
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('TenantDangerSettings: Component', () => {
render(<Component />, { apolloMocks: [commonQueryMock], routerProps });

expect(await screen.findByText('Delete this organization')).toBeInTheDocument();
expect(screen.getByText('Remove organisation')).toBeInTheDocument();
expect(screen.getByText('Remove organization')).toBeInTheDocument();
});

it('should render delete organization subtitle about permissions', async () => {
Expand All @@ -64,7 +64,7 @@ describe('TenantDangerSettings: Component', () => {

render(<Component />, { apolloMocks: [commonQueryMock], routerProps });

const button = await screen.findByRole('button', { name: /remove organisation/i });
const button = await screen.findByRole('button', { name: /remove organization/i });
expect(button).toBeInTheDocument();
expect(screen.getByText('Only members with the Owner role can delete organization')).toBeInTheDocument();
});
Expand Down Expand Up @@ -113,7 +113,7 @@ describe('TenantDangerSettings: Component', () => {
const routerProps = createMockRouterProps(RoutesConfig.tenant.settings.general, { tenantId: '1' });
render(<Component />, { apolloMocks: [commonQueryMock, requestMock, refetchMock], routerProps });

const button = await screen.findByRole('button', { name: /remove organisation/i });
const button = await screen.findByRole('button', { name: /remove organization/i });
await userEvent.click(button);

const continueButton = await screen.findByRole('button', { name: /continue/i });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('TenantDeleteAlert: Component', () => {
it('should render alert when button is clicked', async () => {
render(<Component />);

const button = await screen.findByRole('button', { name: /remove organisation/i });
const button = await screen.findByRole('button', { name: /remove organization/i });
await userEvent.click(button);

expect(await screen.findByText('Are you absolutely sure?')).toBeInTheDocument();
Expand All @@ -25,7 +25,7 @@ describe('TenantDeleteAlert: Component', () => {
const onContinueMock = jest.fn();
render(<Component onContinue={onContinueMock} />);

const button = await screen.findByRole('button', { name: /remove organisation/i });
const button = await screen.findByRole('button', { name: /remove organization/i });
await userEvent.click(button);

const continueButton = await screen.findByRole('button', { name: /continue/i });
Expand All @@ -39,7 +39,7 @@ describe('TenantDeleteAlert: Component', () => {
const onContinueMock = jest.fn();
render(<Component onContinue={onContinueMock} />);

const button = await screen.findByRole('button', { name: /remove organisation/i });
const button = await screen.findByRole('button', { name: /remove organization/i });
await userEvent.click(button);

const continueButton = await screen.findByRole('button', { name: /cancel/i });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const TenantDeleteAlert = ({ onContinue, disabled }: TenantDeleteAlertPro
<AlertDialog>
<AlertDialogTrigger disabled={disabled} className={buttonVariants({ variant: 'destructive' })}>
<FormattedMessage
defaultMessage="Remove organisation"
defaultMessage="Remove organization"
id="Tenant General Settings / Danger Zone / Alert / Tenant Delete Button"
/>
</AlertDialogTrigger>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('TenantSwitch: Component', () => {
expect(screen.queryByTestId('tenant-settings-btn')).not.toBeInTheDocument();
});

it('should not render organisation and invitation labels if only personal tenant', async () => {
it('should not render organization and invitation labels if only personal tenant', async () => {
render(<Component />, {
apolloMocks: [fillCommonQueryWithUser(currentUserFactory({ tenants: [personalTenant] }))],
});
Expand Down Expand Up @@ -112,7 +112,7 @@ describe('TenantSwitch: Component', () => {
const currentTenantButton = await screen.findByText(personalTenantName);
await userEvent.click(currentTenantButton);

const newTenantButton = await screen.findByText(/create new tenant/i);
const newTenantButton = await screen.findByText(/create new organization/i);
await userEvent.click(newTenantButton);

expect(mockNavigate).toHaveBeenCalledWith(`/en/add-tenant`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const TenantSwitch = () => {
<DropdownMenuSeparator />
<DropdownMenuItem onClick={handleNewTenantClick}>
<Plus className="mr-1" size="16" />{' '}
<FormattedMessage defaultMessage="Create new tenant" id="TenantSwitch / Create new tenant" />
<FormattedMessage defaultMessage="Create new organization" id="TenantSwitch / Create new organization" />
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const TenantMembers = () => {
onClick={handleLastInvitationClick}
>
<Plus className="mr-1" size="16" />{' '}
<FormattedMessage defaultMessage="Create new tenant" id="TenantSwitch / Create new tenant" />
<FormattedMessage defaultMessage="Create new tenant" id="TenantSwitch / Create new organization" />
</Button>
</Alert>
) : (
Expand Down

0 comments on commit bf5dea8

Please sign in to comment.