refactor: search e2e ()

This commit is contained in:
Jason Rasmussen 2024-03-08 11:20:54 -05:00 committed by GitHub
parent ffdd504008
commit 89f6190fb0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 239 additions and 339 deletions
e2e/src

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)