Skip to content

Commit

Permalink
change: [UIE-8220] - Settings text update
Browse files Browse the repository at this point in the history
  • Loading branch information
smans-akamai committed Oct 25, 2024
1 parent 73c3342 commit b1ebdde
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 13 deletions.
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-11166-changed-1729892043474.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Changed
---

Database settings text and labels ([#11166](https://github.com/linode/manager/pull/11166))
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ describe('Access Controls', () => {
['disable', true],
['enable', false],
])(
'should %s "Manage Access Control" button when disabled is %s',
'should %s "Manage Access" button when disabled is %s',
(_, isDisabled) => {
const database = databaseFactory.build();
const { getByRole } = renderWithTheme(
<AccessControls database={database} disabled={isDisabled} />
);
const button = getByRole('button', { name: 'Manage Access Controls' });
const button = getByRole('button', { name: 'Manage Access' });

if (isDisabled) {
expect(button).toBeDisabled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const AccessControls = (props: Props) => {
<div className={classes.topSection}>
<div className={classes.sectionTitleAndText}>
<div className={classes.sectionTitle}>
<Typography variant="h3">Access Controls</Typography>
<Typography variant="h3">Manage Access</Typography>
</div>
<div className={classes.sectionText}>{description ?? null}</div>
</div>
Expand All @@ -185,7 +185,7 @@ export const AccessControls = (props: Props) => {
disabled={disabled}
onClick={() => setAddAccessControlDrawerOpen(true)}
>
Manage Access Controls
Manage Access
</Button>
</div>
{ipTable(database.allow_list)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ describe('DatabaseSettings Component', () => {
renderWithTheme(<DatabaseSettings database={database} />);
});

it('Should render a Paper component with headers for Access Controls, Reseting the Root password, and Deleting the Cluster', () => {
it('Should render a Paper component with headers for Manage Access, Reseting the Root password, and Deleting the Cluster', () => {
const { container, getAllByRole } = renderWithTheme(
<DatabaseSettings database={database} />
);
const paper = container.querySelector('.MuiPaper-root');
expect(paper).not.toBeNull();
const headings = getAllByRole('heading');
expect(headings[0].textContent).toBe('Access Controls');
expect(headings[1].textContent).toBe('Reset Root Password');
expect(headings[2].textContent).toBe('Delete Cluster');
expect(headings[0].textContent).toBe('Manage Access');
expect(headings[1].textContent).toBe('Reset the Root Password');
expect(headings[2].textContent).toBe('Delete the Cluster');
});

it.each([
Expand All @@ -33,7 +33,7 @@ describe('DatabaseSettings Component', () => {
);
const button1 = getByTitle('Reset Root Password');
const button2 = getByTitle('Save Changes');
const button3 = getByRole('button', { name: 'Manage Access Controls' });
const button3 = getByRole('button', { name: 'Manage Access' });

if (isDisabled) {
expect(button1).toBeDisabled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ export const DatabaseSettings: React.FC<Props> = (props) => {
descriptiveText={resetRootPasswordCopy}
disabled={disabled}
onClick={onResetRootPassword}
sectionTitle="Reset Root Password"
sectionTitle="Reset the Root Password"
/>
<Divider spacingBottom={22} spacingTop={28} />
<DatabaseSettingsMenuItem
buttonText="Delete Cluster"
descriptiveText={deleteClusterCopy}
disabled={Boolean(profile?.restricted)}
onClick={onDeleteCluster}
sectionTitle="Delete Cluster"
sectionTitle="Delete the Cluster"
/>
<Divider spacingBottom={22} spacingTop={28} />
<MaintenanceWindow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ export const MaintenanceWindow = (props: Props) => {
)}
disabled={disabled}
isClearable={false}
label="Time of Day (UTC)"
label="Time"
menuPlacement="top"
name="Time of Day"
name="Time"
noMarginTop
options={hourSelectionMap}
placeholder="Choose a time"
Expand Down

0 comments on commit b1ebdde

Please sign in to comment.