mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
fix: show popup on successful template build (#19674)
Fixes: https://github.com/coder/coder/issues/18364
This commit is contained in:
@@ -21,7 +21,7 @@ import {
|
||||
TopbarDivider,
|
||||
TopbarIconButton,
|
||||
} from "components/FullPageLayout/Topbar";
|
||||
import { displayError } from "components/GlobalSnackbar/utils";
|
||||
import { displayError, displaySuccess } from "components/GlobalSnackbar/utils";
|
||||
import { Loader } from "components/Loader/Loader";
|
||||
import {
|
||||
ChevronLeftIcon,
|
||||
@@ -185,6 +185,9 @@ export const TemplateVersionEditor: FC<TemplateVersionEditorProps> = ({
|
||||
templateVersion.job.status === "succeeded"
|
||||
) {
|
||||
setDirty(false);
|
||||
displaySuccess(
|
||||
`Template version "${previousVersion.current.name}" built successfully.`,
|
||||
);
|
||||
}
|
||||
previousVersion.current = templateVersion;
|
||||
}, [templateVersion]);
|
||||
|
||||
@@ -104,6 +104,9 @@ const buildTemplateVersion = async (
|
||||
});
|
||||
await user.click(buildButton);
|
||||
await within(topbar).findByText("Success");
|
||||
await screen.findByText(
|
||||
`Template version "${templateVersion.name}" built successfully.`,
|
||||
);
|
||||
};
|
||||
|
||||
test("Use custom name, message and set it as active when publishing", async () => {
|
||||
|
||||
Reference in New Issue
Block a user