Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

test: Order attachments by participant. (#16663)

bgrozev615bbdc39bc8
diff --git a/tests/specs/media/desktopSharing.spec.ts b/tests/specs/media/desktopSharing.spec.ts
index a879882071..b165c90921 100644
--- a/tests/specs/media/desktopSharing.spec.ts
+++ b/tests/specs/media/desktopSharing.spec.ts
@@ -152,7 +152,7 @@ describe('Desktop sharing', () => {
await checkForScreensharingTile(p1, p3);
await checkForScreensharingTile(p2, p3);
- // Add another particpant to verify multiple screenshares are visible without gaps in filmstrip.
+ // Add another participant to verify multiple screenshares are visible without gaps in filmstrip.
await ensureFourParticipants({
configOverwrite: {
filmstrip: {
diff --git a/tests/wdio.conf.ts b/tests/wdio.conf.ts
index d62e13fc3f..6d86dbd588 100644
--- a/tests/wdio.conf.ts
+++ b/tests/wdio.conf.ts
@@ -382,24 +382,25 @@ export const config: WebdriverIO.MultiremoteConfig = {
}));
const allProcessing: Promise<any>[] = [];
+ const attachments: { content: string | Buffer; filename: string; type: string; }[] = [];
multiremotebrowser.instances.forEach((instance: string) => {
const bInstance = multiremotebrowser.getInstance(instance);
allProcessing.push(bInstance.takeScreenshot().then(shot => {
- AllureReporter.addAttachment(
- `Screenshot-${instance}`,
- Buffer.from(shot, 'base64'),
- 'image/png');
+ attachments.push({
+ filename: `${instance}-screenshot`,
+ content: Buffer.from(shot, 'base64'),
+ type: 'image/png' });
}));
// @ts-ignore
allProcessing.push(bInstance.execute(() => typeof APP !== 'undefined' && APP.connection?.getLogs())
.then(logs =>
- logs && AllureReporter.addAttachment(
- `debug-logs-${instance}`,
- JSON.stringify(logs, null, ' '),
- 'text/plain'))
+ logs && attachments.push({
+ filename: `${instance}-debug-logs`,
+ content: JSON.stringify(logs, null, ' '),
+ type: 'text/plain' }))
.catch(e => console.error('Failed grabbing debug logs', e)));
allProcessing.push(
@@ -408,15 +409,29 @@ export const config: WebdriverIO.MultiremoteConfig = {
saveLogs(bInstance, res);
}
- AllureReporter.addAttachment(`console-logs-${instance}`, getLogs(bInstance) || '', 'text/plain');
+ attachments.push({
+ filename: `${instance}-console-logs`,
+ content: getLogs(bInstance) || '',
+ type: 'text/plain' });
}));
allProcessing.push(bInstance.getPageSource().then(source => {
- AllureReporter.addAttachment(`html-source-${instance}`, pretty(source), 'text/plain');
+ attachments.push({
+ filename: `${instance}-html-source`,
+ content: pretty(source),
+ type: 'text/plain' });
}));
});
await Promise.allSettled(allProcessing);
+ attachments.sort(
+ (a, b) => {
+ return a.filename < b.filename ? -1 : 1;
+ }).forEach(
+ a => {
+ AllureReporter.addAttachment(a.filename, a.content, a.type);
+ }
+ );
}
},