diff --git a/src/behaviours/application-update/__snapshots__/installing-update-from-update-channels.test.ts.snap b/src/behaviours/application-update/__snapshots__/installing-update-from-update-channels.test.ts.snap
index 87df586d63..d6399de891 100644
--- a/src/behaviours/application-update/__snapshots__/installing-update-from-update-channels.test.ts.snap
+++ b/src/behaviours/application-update/__snapshots__/installing-update-from-update-channels.test.ts.snap
@@ -1,36 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`installing update from update channels given no update channel selection is stored, when started renders 1`] = `
-
-
{
});
});
- describe("given no update channel selection is stored, when started", () => {
+ describe("when started", () => {
let rendered: RenderResult;
let checkForUpdates: () => Promise;
@@ -85,50 +85,6 @@ describe("installing update from update channels", () => {
expect(rendered.baseElement).toMatchSnapshot();
});
- describe("when user checks for updates", () => {
- let checkForUpdatesPromise: Promise;
-
- beforeEach(async () => {
- checkForUpdatesPromise = checkForUpdates();
- });
-
- it('checks for updates from "latest" update channel by default', () => {
- expect(checkForPlatformUpdatesMock).toHaveBeenCalledWith(
- updateChannels.latest,
- { allowDowngrade: true },
- );
- });
-
- it("renders", () => {
- expect(rendered.baseElement).toMatchSnapshot();
- });
-
- describe("when new update is discovered", () => {
- beforeEach(async () => {
- await checkForPlatformUpdatesMock.resolve({
- updateWasDiscovered: true,
- version: "some-version",
- });
-
- await checkForUpdatesPromise;
- });
-
- it("renders", () => {
- expect(rendered.baseElement).toMatchSnapshot();
- });
-
- describe("when download succeeds", () => {
- beforeEach(async () => {
- await downloadPlatformUpdateMock.resolve({ downloadWasSuccessful: true });
- });
-
- it("renders", () => {
- expect(rendered.baseElement).toMatchSnapshot();
- });
- });
- });
- });
-
describe('given update channel "alpha" is selected, when checking for updates', () => {
let selectedUpdateChannel: {
value: IComputedValue;
@@ -309,6 +265,23 @@ describe("installing update from update channels", () => {
expect(checkForPlatformUpdatesMock).toHaveBeenCalledWith(updateChannels.latest, expect.any(Object));
});
+ it('given no update channel selection is stored and currently using stable release, when user checks for updates, checks for updates from "latest" update channel by default', async () => {
+ applicationBuilder.beforeApplicationStart(({ mainDi }) => {
+ mainDi.override(appVersionInjectable, () => "1.0.0");
+ });
+
+ await applicationBuilder.render();
+
+ const checkForUpdates = applicationBuilder.dis.mainDi.inject(checkForUpdatesInjectable);
+
+ checkForUpdates();
+
+ expect(checkForPlatformUpdatesMock).toHaveBeenCalledWith(
+ updateChannels.latest,
+ { allowDowngrade: true },
+ );
+ });
+
it('given no update channel selection is stored and currently using alpha release, when checking for updates, checks for updates from "alpha" channel', async () => {
applicationBuilder.beforeApplicationStart(({ mainDi }) => {
mainDi.override(appVersionInjectable, () => "1.0.0-alpha");