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
4 changes: 2 additions & 2 deletions apps/desktop/gnome-extension/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"uuid": "snap-shot@t3.codes",
"name": "T3 Code SnapShots",
"description": "Allows T3 Code to capture the focused window, identify it for optional accessibility text, and animate it into T3 Code. Disable this extension to revoke access.",
"shell-version": ["45", "46", "47", "48", "49", "50"],
"version": 2,
"shell-version": ["45", "46", "47", "48", "49", "50", "51"],
"version": 3,
"url": "https://github.com/pingdotgg/t3code"
}
19 changes: 10 additions & 9 deletions apps/desktop/src/snapShot/GnomeCaptureSetup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,13 @@ it("refuses to replace symlinks or downgrade a newer extension", async () => {

it.each([
[{}, "not-installed"],
[{ state: 2, version: 2 }, "disabled"],
[{ state: 1, version: 2 }, "enabled"],
[{ state: 2, version: 3 }, "disabled"],
[{ state: 1, version: 3 }, "enabled"],
[{ state: 1, version: 1 }, "update-required"],
[{ state: 2, version: 2, enabled: false }, "extensions-disabled"],
[{ state: 3, version: 2, error: "Load failed" }, "error"],
[{ shell: "51.0" }, "unsupported"],
[{ state: 1, version: 2, shell: "51.0" }, "update-required"],
[{ state: 2, version: 3, enabled: false }, "extensions-disabled"],
[{ state: 3, version: 3, error: "Load failed" }, "error"],
[{ shell: "52.0" }, "unsupported"],
] as const)("reports GNOME setup state %j", async (options, status) => {
const { setup, call } = fixture(options);
expect((await setup.state()).status).toBe(status);
Expand All @@ -141,7 +142,7 @@ it("requires login for local installs and updates until the new version is loade
expect((await setup.state()).status).toBe("restart-required");
setup.close();
}
const { setup } = fixture({ state: 2, version: 2 });
const { setup } = fixture({ state: 2, version: 3 });
expect((await setup.state()).status).toBe("disabled");
setup.close();
});
Expand All @@ -157,7 +158,7 @@ it("installs only on explicit action without invoking remote installation", asyn
});

it("enables and disables only the capture UUID", async () => {
const { setup, call } = fixture({ state: 2, version: 2 });
const { setup, call } = fixture({ state: 2, version: 3 });
await setup.perform("enable-extension");
await setup.perform("disable-extension");
for (const member of ["EnableExtension", "DisableExtension"]) {
Expand All @@ -172,14 +173,14 @@ it("enables and disables only the capture UUID", async () => {
});

it("never changes the global user-extensions preference", async () => {
const { setup, call } = fixture({ state: 2, version: 2, enabled: false });
const { setup, call } = fixture({ state: 2, version: 3, enabled: false });
await expect(setup.perform("enable-extension")).rejects.toThrow("GNOME has disabled");
expect(call.mock.calls.every(([message]) => message.member.startsWith("Get"))).toBe(true);
setup.close();
});

it("surfaces desktop rejection and disconnect as actionable failures", async () => {
const { setup, bus } = fixture({ state: 2, version: 2, accepted: false });
const { setup, bus } = fixture({ state: 2, version: 3, accepted: false });
await expect(setup.perform("enable-extension")).rejects.toThrow("Sign out");
bus.emit("error", new Error("Session bus disconnected"));
expect(await setup.state()).toEqual({ status: "error", message: "Session bus disconnected" });
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/snapShot/LinuxSnapShot.dbus.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ it.runIf(hasDbus)("captures through real D-Bus marshalling on a private bus", as
} else if (message.member === "GetExtensionInfo") {
server!.send(
Message.newMethodReturn(message, "a{sv}", [
{ state: new Variant("d", shellExtensionState), version: new Variant("d", 2) },
{ state: new Variant("d", shellExtensionState), version: new Variant("d", 3) },
]),
);
} else if (message.member === "EnableExtension" || message.member === "DisableExtension") {
Expand Down
Loading