test: move ParticipantNameService tests to integration tests
This commit is contained in:
parent
398a605d2c
commit
1e0f62c7bd
@ -1,8 +1,8 @@
|
|||||||
import { describe, expect, it, beforeEach, afterEach, beforeAll } from '@jest/globals';
|
import { afterEach, beforeAll, describe, expect, it } from '@jest/globals';
|
||||||
import { container, registerDependencies } from '../../../src/config/index.js';
|
|
||||||
import { ParticipantNameService } from '../../../src/services/participant-name.service.js';
|
|
||||||
import { RedisService } from '../../../src/services/redis.service.js';
|
|
||||||
import ms from 'ms';
|
import ms from 'ms';
|
||||||
|
import { container, registerDependencies } from '../../../../src/config/index.js';
|
||||||
|
import { ParticipantNameService } from '../../../../src/services/participant-name.service.js';
|
||||||
|
import { RedisService } from '../../../../src/services/redis.service.js';
|
||||||
|
|
||||||
describe('ParticipantNameService', () => {
|
describe('ParticipantNameService', () => {
|
||||||
let participantNameService: ParticipantNameService;
|
let participantNameService: ParticipantNameService;
|
||||||
@ -13,10 +13,7 @@ describe('ParticipantNameService', () => {
|
|||||||
registerDependencies();
|
registerDependencies();
|
||||||
participantNameService = container.get(ParticipantNameService);
|
participantNameService = container.get(ParticipantNameService);
|
||||||
redisService = container.get(RedisService);
|
redisService = container.get(RedisService);
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
// Clean up any existing test data
|
|
||||||
await cleanupTestData();
|
await cleanupTestData();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -276,7 +276,6 @@ test.describe('Room Functionality Tests', () => {
|
|||||||
fs.unlinkSync('after.png');
|
fs.unlinkSync('after.png');
|
||||||
fs.unlinkSync('diff.png');
|
fs.unlinkSync('diff.png');
|
||||||
|
|
||||||
await page.waitForTimeout(3000);
|
|
||||||
await leaveRoom(page);
|
await leaveRoom(page);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -256,11 +256,13 @@ export const viewRecordingsAs = async (role: 'moderator' | 'speaker', page: Page
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const leaveRoom = async (page: Page, role: 'moderator' | 'speaker' = 'speaker') => {
|
export const leaveRoom = async (page: Page, role: 'moderator' | 'speaker' = 'speaker') => {
|
||||||
await interactWithElementInIframe(page, '#leave-btn', { action: 'click' });
|
const button = await waitForElementInIframe(page, '#leave-btn');
|
||||||
|
await button.click();
|
||||||
|
|
||||||
if (role === 'moderator') {
|
if (role === 'moderator') {
|
||||||
await page.waitForTimeout(500); // Wait for leave animation
|
await page.waitForTimeout(500); // Wait for leave animation
|
||||||
await interactWithElementInIframe(page, '#leave-option', { action: 'click' });
|
const option = await waitForElementInIframe(page, '#leave-option');
|
||||||
|
await option.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
await page.waitForSelector('.event-left');
|
await page.waitForSelector('.event-left');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user