-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show correct release name in case of error #791
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -102,7 +107,7 @@ class DeploymentForm extends React.Component<IDeploymentFormProps, IDeploymentFo | |||
public render() { | |||
const { selected, bindingsWithSecrets, chartID, chartVersion, namespace } = this.props; | |||
const { version, versions } = selected; | |||
const { appValues, releaseName } = this.state; | |||
const { appValues } = this.state; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not grab latestSubmittedReleaseName
here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! just a minor comment
expect(wrapper.find(ErrorSelector).exists()).toBe(true); | ||
expect(wrapper.find(ErrorSelector).html()).toContain(expectedErrorMsg); | ||
wrapper.setState({ releaseName: "my-app2" }); | ||
expect(wrapper.find(ErrorSelector).html()).toContain(expectedErrorMsg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this assertion won't fail even if the bug is still present (since you are appending just a 2
), you'll need to use a completely different name for the releaseName
or use .not.toContain("my-app2")
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahaaa, good catch!
This patch decouples the releaseName used in the controlled field in the form from the releaseName shown in the error message.
Fixes #757