Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions apps/meteor/tests/e2e/apps/uikit-interactions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ test.describe.serial('Apps > UIKit interactions data', () => {
// Send a message with a button via the slash command
await poHomeChannel.content.dispatchSlashCommand(`/open-uikit-room-test-modal message ${seed}`);

const interactionRequest = page.waitForRequest('**/ui.interaction/*');
const interactionResponse = page.waitForResponse('**/ui.interaction/*');

// Wait for the message with the button to appear and click it
await page.getByRole('button', { name: 'Click!' }).click();

await interactionRequest;
await interactionResponse;

// Fetch app logs and validate
const logsResult = await getAppLogs(api, appId);
Expand Down Expand Up @@ -96,13 +96,13 @@ test.describe.serial('Apps > UIKit interactions data', () => {
// has been closed" while the navigation is still in progress.
await page.waitForURL(/\/app\//);

const interactionRequest = page.waitForRequest('**/ui.interaction/*');
const interactionResponse = page.waitForResponse('**/ui.interaction/*');

// Wait for the contextual bar to appear and click the button
const surface = page.getByRole('dialog', { name: 'UIKit Room Test Contextual Bar' });
await surface.getByRole('button', { name: 'Click!' }).click();

await interactionRequest;
await interactionResponse;

// Fetch app logs and validate
const logsResult = await getAppLogs(api, appId);
Expand Down Expand Up @@ -134,13 +134,13 @@ test.describe.serial('Apps > UIKit interactions data', () => {
// Open a modal via slash command
await poHomeChannel.content.dispatchSlashCommand(`/open-uikit-room-test-modal modal ${seed}`);

const interactionRequest = page.waitForRequest('**/ui.interaction/*');
const interactionResponse = page.waitForResponse('**/ui.interaction/*');

// Wait for the modal to appear and click the button
const surface = page.getByRole('dialog', { name: 'UIKit Room Test Modal' });
await surface.getByRole('button', { name: 'Click!' }).click();

await interactionRequest;
await interactionResponse;

// Fetch app logs and validate
const logsResult = await getAppLogs(api, appId);
Expand Down Expand Up @@ -173,12 +173,12 @@ test.describe.serial('Apps > UIKit interactions data', () => {
// Open a modal via slash command
await poHomeChannel.content.dispatchSlashCommand(`/open-uikit-room-test-modal modal ${seed}`);

const interactionRequest = page.waitForRequest('**/ui.interaction/*');
const interactionResponse = page.waitForResponse('**/ui.interaction/*');

// Wait for the modal and submit it
await page.getByLabel('UIKit Room Test Modal').getByRole('button', { name: 'Submit' }).click();

await interactionRequest;
await interactionResponse;

// Fetch app logs and validate
const logsResult = await getAppLogs(api, appId);
Expand All @@ -205,12 +205,12 @@ test.describe.serial('Apps > UIKit interactions data', () => {
// Wait for the client-side navigation to the contextual bar URL to complete
await page.waitForURL(/\/app\//);

const interactionRequest = page.waitForRequest('**/ui.interaction/*');
const interactionResponse = page.waitForResponse('**/ui.interaction/*');

// Wait for the contextual bar and submit it
await page.getByLabel('UIKit Room Test Contextual Bar').getByRole('button', { name: 'Submit' }).click();

await interactionRequest;
await interactionResponse;

// Fetch app logs and validate
const logsResult = await getAppLogs(api, appId);
Expand All @@ -235,12 +235,12 @@ test.describe.serial('Apps > UIKit interactions data', () => {
// Open a modal via slash command
await poHomeChannel.content.dispatchSlashCommand(`/open-uikit-room-test-modal modal ${seed}`);

const interactionRequest = page.waitForRequest('**/ui.interaction/*');
const interactionResponse = page.waitForResponse('**/ui.interaction/*');

// Wait for the modal and close it (via X button, not submit)
await page.getByLabel('UIKit Room Test Modal').getByRole('button', { name: 'Close' }).click();

await interactionRequest;
await interactionResponse;

// Fetch app logs and validate
const logsResult = await getAppLogs(api, appId);
Expand All @@ -263,12 +263,12 @@ test.describe.serial('Apps > UIKit interactions data', () => {
// Wait for the client-side navigation to the contextual bar URL to complete
await page.waitForURL(/\/app\//);

const interactionRequest = page.waitForRequest('**/ui.interaction/*');
const interactionResponse = page.waitForResponse('**/ui.interaction/*');

// Wait for the contextual bar to appear and close it
await page.getByLabel('UIKit Room Test Contextual Bar').getByRole('button', { name: 'Close' }).click();

await interactionRequest;
await interactionResponse;

// Fetch app logs and validate
const logsResult = await getAppLogs(api, appId);
Expand Down
Loading