feat: Add ability to star collection (#3327)
* Migrations, models, commands * ui * Move starred hint to location state * lint * tsc * refactor * Add collection empty state in expanded sidebar * Add empty placeholder within starred collections * Drag and drop improves, Relative refactor * fix: Starring untitled draft leaves empty space * fix: Creating draft in starred collection shouldnt open main * fix: Dupe drop cursor * Final fixes * fix: Canonical redirect replaces starred location state * fix: Don't show reorder cursor at the top of collection with no permission to edit when dragging
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { sequelize } from "@server/database/sequelize";
|
||||
import { Star, Event } from "@server/models";
|
||||
import { buildDocument, buildUser } from "@server/test/factories";
|
||||
import { flushdb } from "@server/test/support";
|
||||
@@ -14,11 +15,14 @@ describe("starCreator", () => {
|
||||
teamId: user.teamId,
|
||||
});
|
||||
|
||||
const star = await starCreator({
|
||||
documentId: document.id,
|
||||
user,
|
||||
ip,
|
||||
});
|
||||
const star = await sequelize.transaction(async (transaction) =>
|
||||
starCreator({
|
||||
documentId: document.id,
|
||||
user,
|
||||
ip,
|
||||
transaction,
|
||||
})
|
||||
);
|
||||
|
||||
const event = await Event.findOne();
|
||||
expect(star.documentId).toEqual(document.id);
|
||||
@@ -43,11 +47,14 @@ describe("starCreator", () => {
|
||||
index: "P",
|
||||
});
|
||||
|
||||
const star = await starCreator({
|
||||
documentId: document.id,
|
||||
user,
|
||||
ip,
|
||||
});
|
||||
const star = await sequelize.transaction(async (transaction) =>
|
||||
starCreator({
|
||||
documentId: document.id,
|
||||
user,
|
||||
ip,
|
||||
transaction,
|
||||
})
|
||||
);
|
||||
|
||||
const events = await Event.count();
|
||||
expect(star.documentId).toEqual(document.id);
|
||||
|
||||
Reference in New Issue
Block a user