Skip to content

Commit

Permalink
fix: Horizontal scroll in main room if text is too long (#28434)
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo Costa <hugocarreiracosta@gmail.com>
  • Loading branch information
2 people authored and d-gubert committed Mar 22, 2023
1 parent 05b930c commit 9461c59
Show file tree
Hide file tree
Showing 8 changed files with 185 additions and 171 deletions.
8 changes: 4 additions & 4 deletions apps/meteor/tests/e2e/e2e-encryption.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ test.describe.serial('e2e-encryption', () => {

await poHomeChannel.content.sendMessage('hello world');

await expect(poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessage.locator('.rcx-icon--name-key')).toBeVisible();

await poHomeChannel.tabs.kebab.click({ force: true });
Expand All @@ -171,7 +171,7 @@ test.describe.serial('e2e-encryption', () => {

await poHomeChannel.content.sendMessage('hello world not encrypted');

await expect(poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world not encrypted');
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world not encrypted');
await expect(poHomeChannel.content.lastUserMessage.locator('.rcx-icon--name-key')).not.toBeVisible();

await poHomeChannel.tabs.kebab.click({ force: true });
Expand All @@ -181,7 +181,7 @@ test.describe.serial('e2e-encryption', () => {

await poHomeChannel.content.sendMessage('hello world encrypted again');

await expect(poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world encrypted again');
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world encrypted again');
await expect(poHomeChannel.content.lastUserMessage.locator('.rcx-icon--name-key')).toBeVisible();
});

Expand All @@ -207,7 +207,7 @@ test.describe.serial('e2e-encryption', () => {

await poHomeChannel.content.sendMessage('hello world');

await expect(poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessage.locator('.rcx-icon--name-key')).toBeVisible();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ export class FederationHomeContent {
return this.page.locator('[data-qa-type="message"]').last();
}

get lastUserMessageBody(): Locator {
return this.lastUserMessage.locator('[data-qa-type="message-body"]');
}

get lastUserMessageNotSequential(): Locator {
return this.page.locator('[data-qa-type="message"][data-sequential="false"]').last();
}
Expand Down
102 changes: 51 additions & 51 deletions apps/meteor/tests/e2e/federation/tests/messaging/dm.spec.ts

Large diffs are not rendered by default.

112 changes: 57 additions & 55 deletions apps/meteor/tests/e2e/federation/tests/messaging/private.spec.ts

Large diffs are not rendered by default.

114 changes: 59 additions & 55 deletions apps/meteor/tests/e2e/federation/tests/messaging/public.spec.ts

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions apps/meteor/tests/e2e/messaging.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ test.describe.serial('Messaging', () => {

await poHomeChannel.content.sendMessage('hello world');

await expect(auxContext.poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world');
await expect(auxContext.poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');

await auxContext.page.close();
});
Expand All @@ -43,8 +43,8 @@ test.describe.serial('Messaging', () => {

await poHomeChannel.content.sendMessage('hello world');

await expect(poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world');
await expect(auxContext.poHomeChannel.content.lastUserMessage.locator('p')).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
await expect(auxContext.poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');

await auxContext.page.close();
});
Expand Down
4 changes: 4 additions & 0 deletions apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export class HomeContent {
return this.page.locator('[data-qa-type="message"]').last();
}

get lastUserMessageBody(): Locator {
return this.lastUserMessage.locator('[data-qa-type="message-body"]');
}

get lastUserMessageNotSequential(): Locator {
return this.page.locator('[data-qa-type="message"][data-sequential="false"]').last();
}
Expand Down
4 changes: 2 additions & 2 deletions packages/gazzodown/src/blocks/ParagraphBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ type ParagraphBlockProps = {
};

const ParagraphBlock = ({ children }: ParagraphBlockProps): ReactElement => (
<p>
<div>
<InlineElements children={children} />
</p>
</div>
);

export default ParagraphBlock;

0 comments on commit 9461c59

Please sign in to comment.