fix(inbox): a Takeout import's notice opens the user's own import
The import's notice reaches a user who may not see the Scheduler, an admin page, yet its link opened it. It now opens Settings › Account, where the import's status is; any other run still opens the Scheduler. The job id is held to the server's by the backend-ids contract. The notice's Hungarian names the list as the app does elsewhere.
This commit is contained in:
@@ -305,6 +305,14 @@ describe("backend ids have their names in both languages", () => {
|
||||
expect([...RUN_STATUSES].sort()).toEqual([...runStatuses].sort());
|
||||
});
|
||||
|
||||
it("the Takeout import's notice is known by the server's job id", () => {
|
||||
// Read as text: the slice pulls in the request layer, which needs a browser.
|
||||
const feedTs = readFileSync(new URL("../lib/api/feed.ts", import.meta.url), "utf8");
|
||||
const ours = /^export const TAKEOUT_JOB = "(\w+)";$/m.exec(feedTs)?.[1];
|
||||
expect(ours).toBeTruthy();
|
||||
expect(/^TAKEOUT_IMPORT = "(\w+)"$/m.exec(schedulerPy)?.[1]).toBe(ours);
|
||||
});
|
||||
|
||||
for (const lang of ["en", "hu"]) {
|
||||
const keys = keysOf(lang);
|
||||
const missing = (wanted: string[]) => wanted.filter((k) => !keys.has(k));
|
||||
|
||||
Reference in New Issue
Block a user