refactor: search e2e (#7732)

This commit is contained in:
Jason Rasmussen
2024-03-08 11:20:54 -05:00
committed by GitHub
parent ffdd504008
commit 89f6190fb0
8 changed files with 239 additions and 339 deletions

View File

@@ -173,6 +173,7 @@ export const utils = {
},
waitForWebsocketEvent: async ({ event, assetId, timeout: ms }: WaitOptions): Promise<void> => {
console.log(`Waiting for ${event} [${assetId}]`);
const set = events[event];
if (set.has(assetId)) {
return;
@@ -232,6 +233,10 @@ export const utils = {
const assetData = dto?.assetData?.bytes || makeRandomImage();
const filename = dto?.assetData?.filename || 'example.png';
if (dto?.assetData?.bytes) {
console.log(`Uploading ${filename}`);
}
const builder = request(app)
.post(`/asset/upload`)
.attach('assetData', assetData, filename)