Skip to content

Commit 5c4b931

Browse files
updated test to comments
1 parent 088f92e commit 5c4b931

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

__tests__/html2/basic/disableFileUpload.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
run(async function () {
1818
const { directLine, store } = testHelpers.createDirectLineEmulator();
1919

20-
WebChat.renderWebChat(
20+
const { isFluentTheme } = renderWebChat(
2121
{
2222
directLine,
2323
store,
@@ -35,13 +35,13 @@
3535
// Keyboard interaction: try to tab to the upload button
3636
await pageObjects.focusSendBoxTextBox();
3737
await host.sendTab();
38-
console.log('document.activeElement', document.activeElement);
3938

4039
expect(document.activeElement).not.toBe(pageElements.byTestId(WebChat.testIds.sendBoxUploadButton));
4140

4241
// Simulate drag-and-drop using dispatchEvent
43-
const sendBox = document.querySelector('[role="form"]');
44-
if (sendBox) {
42+
const sendBox = pageElements.byTestId(WebChat.testIds.sendBoxContainer);
43+
44+
if (isFluentTheme) {
4545
const dataTransfer = new DataTransfer();
4646
const file = new File(['dummy content'], 'test.txt', { type: 'text/plain' });
4747
dataTransfer.items.add(file);
@@ -74,12 +74,12 @@
7474
// Attachment bar item should not appear
7575
expect(pageElements.byTestId(WebChat.testIds.sendBoxAttachmentBarItem)).toBeFalsy();
7676

77-
await host.snapshot('drag-and-drop-disabled');
77+
await host.snapshot('local');
7878
}
7979

8080
// Hover interaction: hover over the send box area
81-
await host.hover(document.querySelector('[role="form"]'));
82-
await host.snapshot('hover-over-sendbox-toolbar');
81+
await host.hover(pageElements.byTestId(WebChat.testIds.sendBoxContainer));
82+
await host.snapshot('local');
8383

8484
// Final visual confirmation
8585
await host.snapshot('local');

0 commit comments

Comments
 (0)