Skip to content

Commit e823159

Browse files
committed
The test was using run id instead of friendly id
1 parent fed987e commit e823159

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

apps/webapp/app/services/runsRepository.server.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,11 @@ export class RunsRepository {
256256
convertedOptions.bulkId = BulkActionId.toId(options.bulkId);
257257
}
258258

259+
if (options.runIds) {
260+
//convert to friendlyId
261+
convertedOptions.runIds = options.runIds.map((runId) => RunId.toFriendlyId(runId));
262+
}
263+
259264
// Show all runs if we are filtering by batchId or runId
260265
if (options.batchId || options.runIds?.length || options.scheduleId || options.tasks?.length) {
261266
convertedOptions.rootOnly = false;

apps/webapp/test/runsRepository.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ describe("RunsRepository", () => {
11581158
},
11591159
});
11601160

1161-
await setTimeout(2_000);
1161+
await setTimeout(1_000);
11621162

11631163
const runsRepository = new RunsRepository({
11641164
prisma,
@@ -1171,7 +1171,7 @@ describe("RunsRepository", () => {
11711171
projectId: project.id,
11721172
environmentId: runtimeEnvironment.id,
11731173
organizationId: organization.id,
1174-
runIds: [run1.id, run3.id],
1174+
runIds: [run1.friendlyId, run3.friendlyId],
11751175
});
11761176

11771177
expect(runs).toHaveLength(2);

0 commit comments

Comments
 (0)