Skip to content

Commit

Permalink
fix: update cancelId to fix failing windows update e2e test (podman-d…
Browse files Browse the repository at this point in the history
…esktop#9248)

* fix: update cancelId to fix failing windows update e2e test
Signed-off-by: Sonia Sandler <[email protected]>
  • Loading branch information
SoniaSandler authored Oct 7, 2024
1 parent 0824904 commit c7b7bfe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/main/src/plugin/updater.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ describe('expect update command to depends on context', async () => {
await mListener?.('startup');

expect(messageBoxMock.showMessageBox).toHaveBeenCalledWith({
cancelId: 1,
cancelId: 2,
buttons: ['Update now', 'View release notes', 'Remind me later', 'Do not show again'],
message:
'A new version v@debug-next of Podman Desktop is available. Do you want to update your current version v@debug?',
Expand All @@ -434,7 +434,7 @@ describe('expect update command to depends on context', async () => {
await mListener?.('status-bar-entry');

expect(messageBoxMock.showMessageBox).toHaveBeenCalledWith({
cancelId: 1,
cancelId: 2,
buttons: ['Update now', 'View release notes', 'Cancel'],
message:
'A new version v@debug-next of Podman Desktop is available. Do you want to update your current version v@debug?',
Expand Down Expand Up @@ -685,6 +685,7 @@ test('get release notes in dev mode', async () => {
statusBarRegistryMock,
commandRegistryMock,
taskManagerMock,
apiSenderMock,
);

vi.spyOn(global, 'fetch').mockResolvedValueOnce({
Expand Down
2 changes: 1 addition & 1 deletion packages/main/src/plugin/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export class Updater {
title: 'Update Available now',
message: `A new version ${updateVersion} of Podman Desktop is available. Do you want to update your current version ${this.#currentVersion}?`,
buttons: buttons,
cancelId: 1,
cancelId: 2,
});
if (result.response === 3) {
this.updateConfigurationValue('never');
Expand Down

0 comments on commit c7b7bfe

Please sign in to comment.