Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/compass/src/app/components/update-toasts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const RestartCompassToastContent = ({
<button
className={cx(buttonStyles, darkmode && buttonDarkStyles)}
onClick={onUpdateClicked}
data-testid="auto-update-restart-button"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a drive-by I'm adding these test ids so the latest nightly dev release will end up with them and then the auto-update tests can use them.

>
Restart
</button>
Expand Down Expand Up @@ -83,6 +84,7 @@ export function onAutoupdateExternally({
Compass features.
</Body>
<Link
data-testid="auto-update-download-link"
as="a"
target="_blank"
href={'https://www.mongodb.com/try/download/compass'}
Expand Down Expand Up @@ -137,6 +139,7 @@ export function onAutoupdateInstalled({ newVersion }: { newVersion: string }) {
title: `Compass ${newVersion} installed successfully`,
description: (
<Link
data-testid="auto-update-release-notes-link"
as="a"
target="_blank"
href={`https://github.com/mongodb-js/compass/releases/tag/v${newVersion}`}
Expand Down
10 changes: 8 additions & 2 deletions packages/compass/src/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,15 @@ const app = {
});
}

log.info(mongoLogId(1_001_000_338), 'Main Window', 'Recent version info', {
previousVersion: state.previousVersion,
highestInstalledVersion: state.highestInstalledVersion,
APP_VERSION,
});

if (
semver.gt(APP_VERSION, state.previousVersion) &&
state.previousVersion !== DEFAULT_APP_VERSION
state.previousVersion !== DEFAULT_APP_VERSION &&
Copy link
Contributor Author

@lerouxb lerouxb Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APP_VERSION !== state.previousVersion
) {
// Wait a bit before showing the update toast.
setTimeout(() => {
Expand Down
Loading