Fix beta->latest->beta upgrade loop (#6189)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-09-15 08:02:14 -04:00
1 parent b428518857
commit a784ca70b1
8 files changed
+81 -39

No files matched your search

@@ -40,6 +40,36 @@ describe("downgrading version update", () => {
});
[
{
updateChannel: updateChannels.latest,
appVersion: "4.0.0",
downgradeIsAllowed: false,
},
{
updateChannel: updateChannels.beta,
appVersion: "4.0.0",
downgradeIsAllowed: false,
},
{
updateChannel: updateChannels.alpha,
appVersion: "4.0.0",
downgradeIsAllowed: false,
},
{
updateChannel: updateChannels.latest,
appVersion: "4.0.0-latest",
downgradeIsAllowed: false,
},
{
updateChannel: updateChannels.beta,
appVersion: "4.0.0-latest",
downgradeIsAllowed: false,
},
{
updateChannel: updateChannels.alpha,
appVersion: "4.0.0-latest",
downgradeIsAllowed: false,
},
{
updateChannel: updateChannels.latest,
appVersion: "4.0.0-beta",
@@ -50,16 +80,21 @@ describe("downgrading version update", () => {
appVersion: "4.0.0-beta",
downgradeIsAllowed: false,
},
{
updateChannel: updateChannels.beta,
appVersion: "4.0.0-beta.1",
downgradeIsAllowed: false,
},
{
updateChannel: updateChannels.alpha,
appVersion: "4.0.0-beta",
downgradeIsAllowed: false,
},
{
updateChannel: updateChannels.latest,
appVersion: "4.0.0-alpha",
downgradeIsAllowed: true,
},
{
updateChannel: updateChannels.beta,
appVersion: "4.0.0-alpha",
downgradeIsAllowed: false,
},
{
updateChannel: updateChannels.alpha,
appVersion: "4.0.0-alpha",
@@ -91,7 +91,7 @@ describe("installing update", () => {
it("checks for updates", () => {
expect(checkForPlatformUpdatesMock).toHaveBeenCalledWith(
expect.any(Object),
{ allowDowngrade: true },
{ allowDowngrade: false },
);
});
@@ -105,7 +105,7 @@ describe("selection of update stability", () => {
it('checks updates from update channel "alpha"', () => {
expect(checkForPlatformUpdatesMock).toHaveBeenCalledWith(
updateChannels.alpha,
{ allowDowngrade: true },
{ allowDowngrade: false },
);
});
@@ -132,7 +132,7 @@ describe("selection of update stability", () => {
it('checks updates from update channel "beta"', () => {
expect(checkForPlatformUpdatesMock).toHaveBeenCalledWith(
updateChannels.beta,
{ allowDowngrade: true },
{ allowDowngrade: false },
);
});
@@ -159,7 +159,7 @@ describe("selection of update stability", () => {
it('finally checks updates from update channel "latest"', () => {
expect(checkForPlatformUpdatesMock).toHaveBeenCalledWith(
updateChannels.latest,
{ allowDowngrade: true },
{ allowDowngrade: false },
);
});
@@ -279,7 +279,7 @@ describe("selection of update stability", () => {
expect(checkForPlatformUpdatesMock).toHaveBeenCalledWith(
updateChannels.latest,
{ allowDowngrade: true },
{ allowDowngrade: false },
);
});