Skip to content
Snippets Groups Projects
Unverified Commit 3293284d authored by Guilherme Gazzo's avatar Guilherme Gazzo Committed by GitHub
Browse files

test: flaky tests related to lazy room loading (#30155)

parent 7e16fb90
No related branches found
No related tags found
No related merge requests found
......@@ -606,7 +606,7 @@ const RoomBody = (): ReactElement => {
>
<MessageListErrorBoundary>
<ScrollableContentWrapper ref={wrapperRef}>
<ul className='messages-list' aria-live='polite'>
<ul className='messages-list' aria-live='polite' aria-busy={isLoadingMoreMessages}>
{canPreview ? (
<>
{hasMorePreviousMessages ? (
......
......@@ -13,7 +13,7 @@ type RoomLayoutProps = {
} & ComponentProps<typeof Box>;
const RoomLayout = ({ header, body, footer, aside, ...props }: RoomLayoutProps): ReactElement => (
<Box is='main' h='full' display='flex' flexDirection='column' bg='room' {...props}>
<Box h='full' display='flex' flexDirection='column' bg='room' {...props}>
<Suspense fallback={<HeaderSkeleton />}>{header}</Suspense>
<Box display='flex' flexGrow={1} overflow='hidden' height='full' position='relative'>
<Box display='flex' flexDirection='column' flexGrow={1} minWidth={0}>
......
......@@ -145,7 +145,7 @@ export class HomeContent {
}
get btnVideoMessage(): Locator {
return this.page.locator('[data-id="video-message"]');
return this.page.locator('[data-qa-id="video-message"]');
}
get btnRecordAudio(): Locator {
......
......@@ -75,6 +75,12 @@ export class HomeSidenav {
await this.page.locator('role=navigation >> role=button[name=Search]').click();
await this.page.locator('role=search >> role=searchbox').type(name);
await this.page.locator(`role=search >> role=listbox >> role=link >> text="${name}"`).click();
await this.page.locator('role=main').waitFor();
await this.page.locator('role=main >> role=heading[level=1]').waitFor();
await expect(this.page.locator('role=main >> .rcx-skeleton')).toHaveCount(0);
await expect(this.page.locator('role=main >> role=list')).not.toHaveAttribute('aria-busy', 'true');
}
async switchOmnichannelStatus(status: 'offline' | 'online') {
......
......@@ -138,7 +138,7 @@ test.describe.serial('permissions', () => {
test('expect option (upload file) not be visible', async () => {
await poHomeChannel.sidenav.openChat(targetChannel);
await expect(poHomeChannel.content.btnOptionFileUpload).toBeHidden();
await expect(poHomeChannel.content.btnOptionFileUpload).toBeDisabled();
});
test.afterAll(async ({ api }) => {
......@@ -157,7 +157,7 @@ test.describe.serial('permissions', () => {
test('expect option (upload audio) not be visible', async () => {
await poHomeChannel.sidenav.openChat(targetChannel);
await expect(poHomeChannel.content.btnRecordAudio).toBeHidden();
await expect(poHomeChannel.content.btnRecordAudio).toBeDisabled();
});
test.afterAll(async ({ api }) => {
......@@ -176,7 +176,7 @@ test.describe.serial('permissions', () => {
test('expect option (upload video) not be visible', async () => {
await poHomeChannel.sidenav.openChat(targetChannel);
await expect(poHomeChannel.content.btnVideoMessage).toBeHidden();
await expect(poHomeChannel.content.btnVideoMessage).toBeDisabled();
});
test.afterAll(async ({ api }) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment