Add Revit CSV preview API
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
type DatabaseContext,
|
||||
} from "../src/db/database-context.js";
|
||||
import { ExternalCsvConfigurationProjectCommandRepository } from "../src/db/repositories/external-csv-configuration-project-command.repository.js";
|
||||
import { ExternalCsvConfigurationRepository } from "../src/db/repositories/external-csv-configuration.repository.js";
|
||||
import { ProjectTransferRepository } from "../src/db/repositories/project-transfer.repository.js";
|
||||
import { ProjectStateRestoreCommandRepository } from "../src/db/repositories/project-state-restore-command.repository.js";
|
||||
import { readProjectStateSnapshot } from "../src/db/repositories/project-state-snapshot.persistence.js";
|
||||
@@ -169,6 +170,23 @@ describe("external CSV configuration project command", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("distinguishes projects without configuration from unknown projects", () => {
|
||||
const context = createTestDatabase();
|
||||
try {
|
||||
const reader = new ExternalCsvConfigurationRepository(context.db);
|
||||
assert.deepEqual(reader.getByProject("project-1"), {
|
||||
projectExists: true,
|
||||
configuration: null,
|
||||
});
|
||||
assert.deepEqual(reader.getByProject("missing"), {
|
||||
projectExists: false,
|
||||
configuration: null,
|
||||
});
|
||||
} finally {
|
||||
context.close();
|
||||
}
|
||||
});
|
||||
|
||||
it("restores and undoes the complete configuration through snapshot history", () => {
|
||||
const context = createTestDatabase();
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user