Batch of small fixes for RightPaneForm and AddDatabasePane components (#780)

This commit is contained in:
victor-meng
2021-05-12 17:12:03 -07:00
committed by GitHub
parent 2f6dbd83f3
commit 14e58e5519
14 changed files with 44 additions and 65 deletions

View File

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

View File

@@ -101,7 +101,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
<div className="throughputInputContainer throughputInputSpacing">
<Stack horizontal>
<span className="mandatoryStar">*&nbsp;</span>
<Text variant="small" style={{ lineHeight: "20px", fontWeight: 600 }}>
<Text aria-label="Throughput header" variant="small" style={{ lineHeight: "20px", fontWeight: 600 }}>
{getThroughputLabelText()}
</Text>
<InfoTooltip>{PricingUtils.getRuToolTipText()}</InfoTooltip>

View File

@@ -25,6 +25,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
* 
</span>
<Text
aria-label="Throughput header"
key=".0:$.1"
style={
Object {
@@ -35,6 +36,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
variant="small"
>
<span
aria-label="Throughput header"
className="css-54"
style={
Object {