feat: Response mobile layout support v1
All checks were successful
Queue Release Build / prepare (push) Successful in 1m6s
Deploy Web Apps / deploy (push) Successful in 7m35s
Queue Release Build / build-windows (push) Successful in 29m57s
Queue Release Build / build-linux (push) Successful in 46m28s
Queue Release Build / finalize (push) Successful in 49s

This commit is contained in:
2026-05-18 02:25:16 +02:00
parent ecb1a4b3a0
commit dea114aed0
45 changed files with 2369 additions and 377 deletions

View File

@@ -90,10 +90,7 @@ test.describe('Direct private calls', () => {
})
.toBeGreaterThan(0);
await scenario.bob.page.getByRole('button', { name: 'Open private call' }).click();
await expect(scenario.bob.page).toHaveURL(/\/call\//, { timeout: 20_000 });
await scenario.bob.page.getByRole('button', { name: 'Join call' }).click();
await expect(scenario.bob.page.getByRole('button', { name: 'Leave call' })).toBeVisible({ timeout: 20_000 });
await answerIncomingCall(scenario.bob.page);
await expect(scenario.bob.page.locator('[data-testid^="server-rail-call-"]')).toHaveCount(1, { timeout: 20_000 });
await expect
@@ -176,10 +173,7 @@ test.describe('Direct private calls', () => {
})
.toBeGreaterThan(0);
await charlie.page.getByRole('button', { name: 'Open private call' }).click();
await expect(charlie.page).toHaveURL(/\/call\//, { timeout: 20_000 });
await charlie.page.getByRole('button', { name: 'Join call' }).click();
await expect(charlie.page.getByRole('button', { name: 'Leave call' })).toBeVisible({ timeout: 20_000 });
await answerIncomingCall(charlie.page);
await expect(charlie.page.locator('app-private-call aside app-dm-chat').getByText(privateOnlyMessage)).toHaveCount(0);
await waitForConnectedPeerCount(scenario.alice.page, 2, 45_000);
@@ -345,12 +339,7 @@ test.describe('Direct private calls', () => {
})
.toBeGreaterThan(charliePlayCountBeforeGroupCall);
await scenario.bob.page
.getByRole('button', { name: 'Open private call' })
.last()
.click();
await scenario.bob.page.getByRole('button', { name: 'Join call' }).click();
await answerIncomingCall(scenario.bob.page);
await expect
.poll(async () => await getActiveCallAudioLoops(scenario.bob.page), {
timeout: 10_000,
@@ -358,12 +347,7 @@ test.describe('Direct private calls', () => {
})
.toBe(0);
await scenario.charlie.page
.getByRole('button', { name: 'Open private call' })
.last()
.click();
await scenario.charlie.page.getByRole('button', { name: 'Join call' }).click();
await answerIncomingCall(scenario.charlie.page);
await expect
.poll(async () => await getActiveCallAudioLoops(scenario.charlie.page), {
timeout: 10_000,
@@ -378,10 +362,7 @@ test.describe('Direct private calls', () => {
await test.step('Alice starts a private call and Bob joins', async () => {
await startCallFromSearch(scenario.alice.page, scenario.bobUserId, 'Bob');
await scenario.bob.page.getByRole('button', { name: 'Open private call' }).click();
await expect(scenario.bob.page).toHaveURL(/\/call\//, { timeout: 20_000 });
await scenario.bob.page.getByRole('button', { name: 'Join call' }).click();
await expect(scenario.bob.page.getByRole('button', { name: 'Leave call' })).toBeVisible({ timeout: 20_000 });
await answerIncomingCall(scenario.bob.page);
await waitForConnectedPeerCount(scenario.alice.page, 1, 45_000);
await waitForConnectedPeerCount(scenario.bob.page, 1, 45_000);
@@ -413,12 +394,11 @@ test.describe('Direct private calls', () => {
await test.step('Caller leaving before answer clears recipient call route and rail icon', async () => {
await startCallFromSearch(scenario.alice.page, scenario.bobUserId, 'Bob');
await scenario.bob.page.getByRole('button', { name: 'Open private call' }).click();
await expect(scenario.bob.page).toHaveURL(/\/call\//, { timeout: 20_000 });
await expect(incomingCallDialog(scenario.bob.page)).toBeVisible({ timeout: 20_000 });
await scenario.alice.page.getByRole('button', { name: 'Leave call' }).click();
await expect(scenario.alice.page).toHaveURL(/\/dm\//, { timeout: 20_000 });
await expect(scenario.bob.page).toHaveURL(/\/dm\//, { timeout: 20_000 });
await expect(incomingCallDialog(scenario.bob.page)).toHaveCount(0, { timeout: 20_000 });
await expect(scenario.bob.page.getByRole('button', { name: 'Open private call' })).toHaveCount(0);
await expect(scenario.bob.page.locator('[data-testid^="server-rail-call-"]')).toHaveCount(0);
await expect
@@ -431,9 +411,7 @@ test.describe('Direct private calls', () => {
await test.step('Leaving an answered call clears local ringing and returns to DM', async () => {
await startCallFromSearch(scenario.alice.page, scenario.bobUserId, 'Bob');
await scenario.bob.page.getByRole('button', { name: 'Open private call' }).click();
await scenario.bob.page.getByRole('button', { name: 'Join call' }).click();
await expect(scenario.bob.page.getByRole('button', { name: 'Leave call' })).toBeVisible({ timeout: 20_000 });
await answerIncomingCall(scenario.bob.page);
await scenario.bob.page.getByRole('button', { name: 'Leave call' }).click();
await expect(scenario.bob.page).toHaveURL(/\/dm\//, { timeout: 20_000 });
@@ -633,6 +611,30 @@ async function startCallFromSearch(page: Page, userId: string, displayName: stri
await expect(page).toHaveURL(/\/call\//, { timeout: 20_000 });
}
function incomingCallDialog(page: Page) {
return page.getByRole('dialog', { name: /is calling/ });
}
async function answerIncomingCall(page: Page): Promise<void> {
const dialog = incomingCallDialog(page);
if (await dialog.isVisible({ timeout: 5_000 }).catch(() => false)) {
await dialog.getByRole('button', { name: 'Answer' }).click();
} else {
await page.getByRole('button', { name: 'Open private call' }).last().click();
await expect(page).toHaveURL(/\/call\//, { timeout: 20_000 });
const joinButton = page.getByRole('button', { name: 'Join call' });
if (await joinButton.isVisible({ timeout: 5_000 }).catch(() => false)) {
await joinButton.click();
}
}
await expect(page).toHaveURL(/\/call\//, { timeout: 20_000 });
await expect(page.getByRole('button', { name: 'Leave call' })).toBeVisible({ timeout: 20_000 });
}
async function getCurrentUserId(page: Page): Promise<string> {
return await page.evaluate(() => localStorage.getItem('metoyou_currentUserId') ?? '');
}