Skip to content

Commit 99c274b

Browse files
author
marker dao ®
committed
feat(TC Tests, MB): Add new test for attach button
1 parent 6d84bd2 commit 99c274b

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

e2e/testcafe-devextreme/tests/chat/messageBox.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,27 @@ test('Chat: messagebox with editing preview', async (t) => {
8181
height: 600,
8282
}, '#chat');
8383
});
84+
85+
test('Chat: messagebox with attach button', async (t) => {
86+
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
87+
88+
const chat = new Chat('#chat');
89+
90+
await chat.focus();
91+
await testScreenshot(t, takeScreenshot, 'Messagebox with attach button.png', { element: '#chat' });
92+
93+
await t.typeText(chat.getInput(), getShortText());
94+
await testScreenshot(t, takeScreenshot, 'Messagebox with attach button and text.png', { element: '#chat' });
95+
96+
await t
97+
.expect(compareResults.isValid())
98+
.ok(compareResults.errorMessages());
99+
}).before(async () => {
100+
await appendElementTo('#container', 'div', 'chat');
101+
102+
return createWidget('dxChat', {
103+
width: 400,
104+
height: 600,
105+
fileUploaderOptions: {},
106+
}, '#chat');
107+
});

0 commit comments

Comments
 (0)