Files
Tom Moor 6d7cd455e9 chore: Decouple core plugins (#14340)
* chore: Move plugin-specific integration code into plugins

Core no longer imports from or names the settings of individual plugins.
Plugins now register mention providers, issue status icons, instance URLs,
settings keys, settings and import schemas, and OAuth clients through hooks.

* fix: Recompute embed instance URLs after plugins load and match legacy issue icons by URL

* fix: Skip logo upload jobs queued without a settings path

* chore: Choose issue status icons from the unfurl state
2026-11-02 19:42:48 -05:00

28 lines
858 B
TypeScript

import { ImportState, IntegrationService } from "@shared/types";
import { buildAdmin, buildAttachment } from "@server/test/factories";
import { getTestServer } from "@server/test/support";
const server = getTestServer();
describe("#imports.create", () => {
it("should create a slab import from an uploaded file", async () => {
const admin = await buildAdmin();
const attachment = await buildAttachment({
teamId: admin.teamId,
userId: admin.id,
});
const res = await server.post("/api/imports.create", admin, {
body: {
attachmentId: attachment.id,
service: IntegrationService.Slab,
},
});
const body = await res.json();
expect(res.status).toEqual(200);
expect(body.data.state).toEqual(ImportState.Created);
expect(body.data.service).toEqual(IntegrationService.Slab);
});
});