Skip to content

Commit e4d4208

Browse files
cdragebenoitf
authored andcommitted
nit: remove my-custom-image default value from image build
### What does this PR do? Removes the default name which instead should be the placeholder that shows you what information you can enter ### Screenshot / video of UI <!-- If this PR is changing UI, please include screenshots or screencasts showing the difference --> ### What issues does this PR fix or reference? <!-- Include any related issues from Podman Desktop repository (or from another issue tracker). --> Closes podman-desktop#6748 ### How to test this PR? <!-- Please explain steps to verify the functionality, do not forget to provide unit/component tests --> - [X] Tests are covering the bug fix or the new feature Also view the Build Page Signed-off-by: Charlie Drage <[email protected]>
1 parent 0426cbc commit e4d4208

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

packages/renderer/src/lib/image/BuildImageFromContainerfile.spec.ts

+10
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,13 @@ test('Expect Abort button to being visible when image build is in progress', asy
151151
expect(abortButton).toBeInTheDocument();
152152
expect(abortButton).toBeEnabled();
153153
});
154+
155+
test('Expect no value for containerImageName input field (no my-custom-image value), just show the placeholder.', async () => {
156+
setup();
157+
render(BuildImageFromContainerfile);
158+
159+
const containerImageName = screen.getByRole('textbox', { name: 'Image Name' });
160+
expect(containerImageName).toBeInTheDocument();
161+
expect(containerImageName).toHaveValue('');
162+
expect(containerImageName).toHaveAttribute('placeholder', 'Image name (e.g. quay.io/namespace/my-custom-image)');
163+
});

packages/renderer/src/lib/image/BuildImageFromContainerfile.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import BuildImageFromContainerfileCards from './BuildImageFromContainerfileCards
2727
import NoContainerEngineEmptyScreen from './NoContainerEngineEmptyScreen.svelte';
2828
2929
let buildFinished = false;
30-
let containerImageName = 'my-custom-image';
30+
let containerImageName: string;
3131
let containerFilePath: string;
3232
let containerBuildContextDirectory: string;
3333
let containerBuildPlatform: string;
@@ -194,7 +194,7 @@ async function abortBuild() {
194194
bind:value="{containerImageName}"
195195
name="containerImageName"
196196
id="containerImageName"
197-
placeholder="image name (e.g. quay.io/namespace/my-custom-image)"
197+
placeholder="Image name (e.g. quay.io/namespace/my-custom-image)"
198198
class="w-full"
199199
required />
200200
{#if providerConnections.length > 1}

0 commit comments

Comments
 (0)