fix for defects 2276938,2280272,2276941,2262647

This commit is contained in:
Sampath
2023-03-27 16:33:08 +05:30
parent e2b72a3824
commit a2b0cf236e
5 changed files with 324 additions and 308 deletions

View File

@@ -142,7 +142,6 @@ export const TableEntity: FunctionComponent<TableEntityProps> = ({
{...imageProps} {...imageProps}
src={EditIcon} src={EditIcon}
alt="editEntity" alt="editEntity"
id="editEntity"
onClick={onEditEntity} onClick={onEditEntity}
tabIndex={0} tabIndex={0}
onKeyPress={handleKeyPress} onKeyPress={handleKeyPress}

View File

@@ -23,12 +23,12 @@ describe("ThroughputInput Pane", () => {
}); });
it("should switch mode properly", () => { 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( expect(wrapper.find('[aria-label="Throughput header"]').at(0).text()).toBe(
"Container throughput (400 - unlimited RU/s)" "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)"); 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 <input
id="Autoscale-input" id="Autoscale-input"
className="throughputInputRadioBtn" className="throughputInputRadioBtn"
aria-label="Autoscale database throughput" aria-label={`Autoscale` + " " + getThroughputLabelText()}
aria-required={true} aria-required={true}
checked={isAutoscaleSelected} checked={isAutoscaleSelected}
type="radio" type="radio"
@@ -204,7 +204,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
<input <input
id="Manual-input" id="Manual-input"
className="throughputInputRadioBtn" className="throughputInputRadioBtn"
aria-label="Manual database throughput" aria-label={`Manual` + " " + getThroughputLabelText()}
checked={!isAutoscaleSelected} checked={!isAutoscaleSelected}
type="radio" type="radio"
aria-required={true} aria-required={true}
@@ -222,6 +222,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
<Stack className="throughputInputSpacing"> <Stack className="throughputInputSpacing">
<Text variant="small" aria-label="capacity calculator of azure cosmos db"> <Text variant="small" aria-label="capacity calculator of azure cosmos db">
Estimate your required RU/s with{" "} Estimate your required RU/s with{" "}
<u style={{ color: "#0078D4" }}>
<Link <Link
target="_blank" target="_blank"
href="https://cosmos.azure.com/capacitycalculator/" href="https://cosmos.azure.com/capacitycalculator/"
@@ -229,6 +230,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
> >
capacity calculator capacity calculator
</Link> </Link>
</u>
. .
</Text> </Text>
@@ -249,8 +251,9 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
onChange={(event, newInput?: string) => onThroughputValueChange(newInput)} onChange={(event, newInput?: string) => onThroughputValueChange(newInput)}
step={AutoPilotUtils.autoPilotIncrementStep} step={AutoPilotUtils.autoPilotIncrementStep}
min={AutoPilotUtils.autoPilotThroughput1K} min={AutoPilotUtils.autoPilotThroughput1K}
max={!isSharded ? 10000 : 9000000000000}
value={throughput.toString()} value={throughput.toString()}
aria-label="Max request units per second" ariaLabel="Max request units per second"
required={true} required={true}
errorMessage={throughputError} errorMessage={throughputError}
/> />
@@ -270,9 +273,11 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
<Stack className="throughputInputSpacing"> <Stack className="throughputInputSpacing">
<Text variant="small" aria-label="ruDescription"> <Text variant="small" aria-label="ruDescription">
Estimate your required RU/s with&nbsp; Estimate your required RU/s with&nbsp;
<u style={{ color: "#0078D4" }}>
<Link target="_blank" href="https://cosmos.azure.com/capacitycalculator/" aria-label="capacityLink"> <Link target="_blank" href="https://cosmos.azure.com/capacitycalculator/" aria-label="capacityLink">
capacity calculator capacity calculator
</Link> </Link>
</u>
. .
</Text> </Text>
@@ -295,7 +300,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
min={SharedConstants.CollectionCreation.DefaultCollectionRUs400} min={SharedConstants.CollectionCreation.DefaultCollectionRUs400}
max={userContext.isTryCosmosDBSubscription ? Constants.TryCosmosExperience.maxRU : Infinity} max={userContext.isTryCosmosDBSubscription ? Constants.TryCosmosExperience.maxRU : Infinity}
value={throughput.toString()} value={throughput.toString()}
aria-label="Max request units per second" ariaLabel="Max request units per second"
required={true} required={true}
errorMessage={throughputError} errorMessage={throughputError}
/> />

View File

@@ -659,7 +659,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
role="radiogroup" role="radiogroup"
> >
<input <input
aria-label="Autoscale database throughput" aria-label="Autoscale Container throughput (autoscale)"
aria-required={true} aria-required={true}
checked={true} checked={true}
className="throughputInputRadioBtn" className="throughputInputRadioBtn"
@@ -676,7 +676,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
Autoscale Autoscale
</label> </label>
<input <input
aria-label="Manual database throughput" aria-label="Manual Container throughput (autoscale)"
aria-required={true} aria-required={true}
checked={false} checked={false}
className="throughputInputRadioBtn" className="throughputInputRadioBtn"
@@ -712,6 +712,13 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
> >
Estimate your required RU/s with Estimate your required RU/s with
<u
style={
Object {
"color": "#0078D4",
}
}
>
<StyledLinkBase <StyledLinkBase
aria-label="capacity calculator of azure cosmos db" aria-label="capacity calculator of azure cosmos db"
href="https://cosmos.azure.com/capacitycalculator/" href="https://cosmos.azure.com/capacitycalculator/"
@@ -1007,6 +1014,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
</a> </a>
</LinkBase> </LinkBase>
</StyledLinkBase> </StyledLinkBase>
</u>
. .
</span> </span>
</Text> </Text>
@@ -1640,10 +1648,11 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
</div> </div>
</Stack> </Stack>
<StyledTextFieldBase <StyledTextFieldBase
aria-label="Max request units per second" ariaLabel="Max request units per second"
errorMessage="" errorMessage=""
id="autoscaleRUValueField" id="autoscaleRUValueField"
key=".0:$.2" key=".0:$.2"
max={9000000000000}
min={1000} min={1000}
onChange={[Function]} onChange={[Function]}
required={true} required={true}
@@ -1663,10 +1672,11 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
value="4000" value="4000"
> >
<TextFieldBase <TextFieldBase
aria-label="Max request units per second" ariaLabel="Max request units per second"
deferredValidationTime={200} deferredValidationTime={200}
errorMessage="" errorMessage=""
id="autoscaleRUValueField" id="autoscaleRUValueField"
max={9000000000000}
min={1000} min={1000}
onChange={[Function]} onChange={[Function]}
required={true} required={true}
@@ -1961,8 +1971,10 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
> >
<input <input
aria-invalid={false} aria-invalid={false}
aria-label="Max request units per second"
className="ms-TextField-field field-64" className="ms-TextField-field field-64"
id="autoscaleRUValueField" id="autoscaleRUValueField"
max={9000000000000}
min={1000} min={1000}
onBlur={[Function]} onBlur={[Function]}
onChange={[Function]} onChange={[Function]}

View File

@@ -23,7 +23,7 @@ export class MiddlePaneComponent extends React.Component<MiddlePaneComponentProp
onClick={this.props.toggleExpandGraph} onClick={this.props.toggleExpandGraph}
role="button" role="button"
aria-expanded={this.props.isTabsContentExpanded} aria-expanded={this.props.isTabsContentExpanded}
aria-name="View graph in full screen" aria-label="View graph in full screen"
> >
<img <img
src={this.props.isTabsContentExpanded ? CollapseArrowIcon : ExpandIcon} src={this.props.isTabsContentExpanded ? CollapseArrowIcon : ExpandIcon}