Skip to content
Snippets Groups Projects
Unverified Commit abfaf9fa authored by Gustavo Saiani's avatar Gustavo Saiani Committed by GitHub
Browse files

Update copy in confirm modal for cancelling new model (#25890)

parent b5074824
No related branches found
No related tags found
No related merge requests found
......@@ -15,13 +15,25 @@ export default class Confirm extends Component {
static propTypes = {
action: PropTypes.func.isRequired,
title: PropTypes.string.isRequired,
message: PropTypes.string,
confirmButtonText: PropTypes.string,
cancelButtonText: PropTypes.string,
children: PropTypes.any,
content: PropTypes.any,
triggerClasses: PropTypes.string,
};
render() {
const { action, children, title, content, triggerClasses } = this.props;
const {
action,
children,
title,
content,
message,
confirmButtonText,
cancelButtonText,
triggerClasses,
} = this.props;
return (
<ModalWithTrigger
ref={this.modal}
......@@ -31,6 +43,9 @@ export default class Confirm extends Component {
<ConfirmContent
title={title}
content={content}
message={message}
confirmButtonText={confirmButtonText}
cancelButtonText={cancelButtonText}
onClose={() => {
this.modal.current.close();
}}
......
......@@ -440,7 +440,9 @@ function DatasetEditor(props) {
<Confirm
key="cancel"
action={handleCancelCreate}
title={t`Cancel creating model`}
title={t`Discard changes?`}
message={t`Your model won't be created.`}
confirmButtonText={t`Discard`}
>
<Button small>{t`Cancel`}</Button>
</Confirm>
......
......@@ -14,7 +14,7 @@ describe("scenarios > models > create", () => {
// Cancel creation with confirmation modal
cy.findByText("Cancel").click();
cy.findByText("Yes").click();
cy.findByText("Discard").click();
// Now we will create a model
goFromHomePageToNewNativeQueryModelPage();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment