Skip to content

Commit

Permalink
Chat: Make screenshot test stable
Browse files Browse the repository at this point in the history
Co-authored-by: marker dao ® <[email protected]>
  • Loading branch information
marker-dao and marker dao ® authored Dec 18, 2024
1 parent 8abb9f3 commit a1a6966
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions e2e/testcafe-devextreme/tests/chat/avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ test('Chat: avatar', async (t) => {

test('Chat: showAvatar set to false', async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

await testScreenshot(t, takeScreenshot, 'Avatar with showAvatar set to false.png', { element: '#chat' });

await t
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions e2e/testcafe-devextreme/tests/chat/messageBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ test('Chat: messagebox', async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

const chat = new Chat('#chat');

const shortText = getShortText();
const longText = getLongText(false, 5);

Expand Down
3 changes: 1 addition & 2 deletions e2e/testcafe-devextreme/tests/chat/messageList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ test('Messagelist appearance with scrollbar', async (t) => {

test('Messagelist should scrolled to the latest messages after being rendered inside an invisible element', async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

const tabPanel = new TabPanel('#container');

await t
Expand Down Expand Up @@ -185,8 +184,8 @@ test('Messagelist with loadindicator appearance on initial loading', async (t) =
});

test('Messagelist with messageTemplate', async (t) => {
const chat = new Chat('#container');
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
const chat = new Chat('#container');

await testScreenshot(t, takeScreenshot, 'Messagelist with message template.png', { element: '#container' });

Expand Down
3 changes: 2 additions & 1 deletion e2e/testcafe-devextreme/tests/chat/typingIndicator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ fixture.disablePageReloads`ChatTypingIndicator`

test('Chat: typing indicator with emptyview', async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

const chat = new Chat('#container');

await chat.repaint();

await testScreenshot(t, takeScreenshot, 'Typing indicator with emptyview.png', {
element: '#container',
shouldTestInCompact: true,
Expand Down

0 comments on commit a1a6966

Please sign in to comment.