visual and arialabel were different which has been changed as required and tests have been updated (#1685)

This commit is contained in:
MokireddySampath 2024-01-04 19:34:14 +05:30 committed by GitHub
parent a2a5407b15
commit ad1391f623
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -23,12 +23,12 @@ describe("ThroughputInput Pane", () => {
});
it("should switch mode properly", () => {
wrapper.find('[aria-label="Manual database throughput"]').simulate("change");
wrapper.find('[id="Manual-input"]').simulate("change");
expect(wrapper.find('[aria-label="Throughput header"]').at(0).text()).toBe(
"Container throughput (400 - unlimited RU/s)",
);
wrapper.find('[aria-label="Autoscale database throughput"]').simulate("change");
wrapper.find('[id="Autoscale-input"]').simulate("change");
expect(wrapper.find('[aria-label="Throughput header"]').at(0).text()).toBe("Container throughput (autoscale)");
});
});

View File

@ -189,7 +189,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
<input
id="Autoscale-input"
className="throughputInputRadioBtn"
aria-label="Autoscale database throughput"
aria-label={`${getThroughputLabelText()} Autoscale`}
aria-required={true}
checked={isAutoscaleSelected}
type="radio"
@ -204,7 +204,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
<input
id="Manual-input"
className="throughputInputRadioBtn"
aria-label="Manual database throughput"
aria-label={`${getThroughputLabelText()} Manual`}
checked={!isAutoscaleSelected}
type="radio"
aria-required={true}

View File

@ -678,7 +678,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
role="radiogroup"
>
<input
aria-label="Autoscale database throughput"
aria-label="Container throughput (autoscale) Autoscale"
aria-required={true}
checked={true}
className="throughputInputRadioBtn"
@ -695,7 +695,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
Autoscale
</label>
<input
aria-label="Manual database throughput"
aria-label="Container throughput (autoscale) Manual"
aria-required={true}
checked={false}
className="throughputInputRadioBtn"