Skip to content

Commit d415964

Browse files
authored
fix: show popup on successful template build (#19674)
Fixes: #18364
1 parent 18945a7 commit d415964

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

site/src/pages/TemplateVersionEditorPage/TemplateVersionEditor.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
TopbarDivider,
2222
TopbarIconButton,
2323
} from "components/FullPageLayout/Topbar";
24-
import { displayError } from "components/GlobalSnackbar/utils";
24+
import { displayError, displaySuccess } from "components/GlobalSnackbar/utils";
2525
import { Loader } from "components/Loader/Loader";
2626
import {
2727
ChevronLeftIcon,
@@ -185,6 +185,9 @@ export const TemplateVersionEditor: FC<TemplateVersionEditorProps> = ({
185185
templateVersion.job.status === "succeeded"
186186
) {
187187
setDirty(false);
188+
displaySuccess(
189+
`Template version "${previousVersion.current.name}" built successfully.`,
190+
);
188191
}
189192
previousVersion.current = templateVersion;
190193
}, [templateVersion]);

site/src/pages/TemplateVersionEditorPage/TemplateVersionEditorPage.test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ const buildTemplateVersion = async (
104104
});
105105
await user.click(buildButton);
106106
await within(topbar).findByText("Success");
107+
await screen.findByText(
108+
`Template version "${templateVersion.name}" built successfully.`,
109+
);
107110
};
108111

109112
test("Use custom name, message and set it as active when publishing", async () => {

0 commit comments

Comments
 (0)