Skip to content
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

Merged
merged 3 commits into from
Nov 8, 2018

Conversation

migmartri
Copy link
Contributor

@migmartri migmartri commented Nov 7, 2018

This patch decouples the releaseName used in the controlled field in the form from the releaseName shown in the error message.
peek 2018-11-07 11-46

Fixes #757

Copy link
Contributor

@prydonius prydonius left a 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;
Copy link
Contributor

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?

Copy link
Contributor

@andresmgot andresmgot left a 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);
Copy link
Contributor

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").

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahaaa, good catch!

@migmartri migmartri merged commit 468b549 into vmware-tanzu:master Nov 8, 2018
@migmartri migmartri deleted the 757-fix-deploy-name branch November 8, 2018 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants