Skip to content

Commit ba9d67a

Browse files
committed
Merge branch 'development' into fix/5296-safari
2 parents 7774d19 + fd05c73 commit ba9d67a

File tree

9 files changed

+64
-103
lines changed

9 files changed

+64
-103
lines changed

apps/chat-e2e/src/tests/conversationWithAttachmentInResponse.test.ts

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
import { Conversation } from '@/chat/types/chat';
22
import dialTest from '@/src/core/dialFixtures';
33
import { API, Attachment } from '@/src/testData';
4-
import { Button } from '@/src/ui/webElements';
54
import { GeneratorUtil, ModelsUtil } from '@/src/utils';
65

76
dialTest(
87
'Generated in response picture appears in Manage attachments',
98
async ({
109
dialHomePage,
10+
filesManagerPage,
1111
setTestIds,
12-
chatBar,
12+
navigationPanel,
1313
conversationData,
1414
localStorageManager,
1515
dataInjector,
1616
fileApiHelper,
17-
filesManagerModalFoldersTree,
18-
filesManagerModalGrid,
19-
filesManagerModalGridAssertion,
20-
filesManagerModal,
17+
filesManagerFoldersTree,
18+
filesManagerGrid,
19+
filesManagerGridAssertion,
2120
chatHeader,
2221
chat,
2322
talkToAgentDialog,
@@ -34,7 +33,6 @@ dialTest(
3433
const secondImagePath = API.modelFilePath(updatedModel.id);
3534
const secondImagePathSegments = secondImagePath.split('/');
3635
const requestContent = 'request';
37-
let closeButton: Button;
3836

3937
await dialTest.step(
4038
'Create conversation with attachment in the response',
@@ -57,46 +55,44 @@ dialTest(
5755
);
5856

5957
await dialTest.step(
60-
'Open "Manage attachments" modal and verify image is placed inside nested folders',
58+
'Open "Files manager" page and verify image is placed inside nested folders',
6159
async () => {
62-
await dialHomePage.openHomePage();
63-
await dialHomePage.waitForPageLoaded();
64-
await conversations.selectEntity(responseImageConversation.name);
65-
await chatBar.openManageAttachmentsModal();
66-
await filesManagerModalFoldersTree.expandFolders(...imagePathSegments);
67-
await filesManagerModalGridAssertion.assertElementState(
68-
filesManagerModalGrid.gridRowByNameCell(Attachment.sunImageName),
60+
await filesManagerPage.openFilesManagerPage();
61+
await filesManagerPage.waitForPageLoaded();
62+
await filesManagerFoldersTree.expandFolders(...imagePathSegments);
63+
await filesManagerGridAssertion.assertGridRowByNameState(
64+
Attachment.sunImageName,
6965
'visible',
7066
);
71-
closeButton = filesManagerModal.getCloseButton();
72-
await closeButton.click();
7367
},
7468
);
7569

7670
await dialTest.step(
77-
'Generate one more picture for the same conversation and verify it is visible on "Manage attachments" modal',
71+
'Generate one more picture for the same conversation and verify it is visible on "Files manager"',
7872
async () => {
73+
await navigationPanel.backToChat();
7974
await dialHomePage.mockChatImageResponse(
8075
defaultModel.id,
8176
Attachment.cloudImageName,
8277
);
78+
await conversations.selectEntity(responseImageConversation.name);
8379
await chat.sendRequestWithButton(requestContent);
8480
await fileApiHelper.putFile(Attachment.cloudImageName, {
8581
parentPath: imagePath,
8682
});
8783

88-
await chatBar.openManageAttachmentsModal();
89-
await filesManagerModalFoldersTree.expandFolders(...imagePathSegments);
90-
await filesManagerModalGridAssertion.assertElementState(
91-
filesManagerModalGrid.gridRowByNameCell(Attachment.cloudImageName),
84+
await navigationPanel.goToFilesManager();
85+
await filesManagerFoldersTree.expandFolders(...imagePathSegments);
86+
await filesManagerGridAssertion.assertElementState(
87+
filesManagerGrid.gridRowByNameCell(Attachment.cloudImageName),
9288
'visible',
9389
);
94-
await closeButton.click();
90+
await navigationPanel.backToChat();
9591
},
9692
);
9793

9894
await dialTest.step(
99-
'Change conversation model, generate one more picture and verify it is visible on "Manage attachments" modal under new model folder',
95+
'Change conversation model, generate one more picture and verify it is visible on "Files manager" under new model folder',
10096
async () => {
10197
await chatHeader.chatAgent.click();
10298
await talkToAgentDialog.selectAgent(updatedModel);
@@ -110,12 +106,10 @@ dialTest(
110106
parentPath: secondImagePath,
111107
});
112108

113-
await chatBar.openManageAttachmentsModal();
114-
await filesManagerModalFoldersTree.expandFolders(
115-
...secondImagePathSegments,
116-
);
117-
await filesManagerModalGridAssertion.assertElementState(
118-
filesManagerModalGrid.gridRowByNameCell(Attachment.flowerImageName),
109+
await navigationPanel.goToFilesManager();
110+
await filesManagerFoldersTree.expandFolders(...secondImagePathSegments);
111+
await filesManagerGridAssertion.assertElementState(
112+
filesManagerGrid.gridRowByNameCell(Attachment.flowerImageName),
119113
'visible',
120114
);
121115
},

apps/chat-e2e/src/tests/errorUploadFromDevice.test.ts

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
Attachment,
44
ExpectedConstants,
55
ExpectedMessages,
6+
UploadMenuOptions,
67
} from '@/src/testData';
78
import { ThemeColorAttributes } from '@/src/ui/domData';
89
import { GeneratorUtil } from '@/src/utils';
@@ -13,15 +14,13 @@ dialTest(
1314
'[Upload from device] Error appears if to load the file with the same name and extension if it already exists in a folder.\n' +
1415
'Long file name in errors does not break UI on "Upload from device"',
1516
async ({
16-
dialHomePage,
17+
filesManagerPage,
1718
setTestIds,
18-
filesManagerModal,
19-
filesManagerModalGrid,
19+
filesManagerToolbar,
20+
filesManagerGridAssertion,
2021
fileConflictConfirmationPopup,
2122
fileConflictConfirmationPopupAssertion,
2223
fileApiHelper,
23-
chatBar,
24-
baseAssertion,
2524
localStorageManager,
2625
}) => {
2726
setTestIds('EPMRTC-1777', 'EPMRTC-1778');
@@ -32,18 +31,21 @@ dialTest(
3231
});
3332

3433
await dialTest.step(
35-
'Upload the same file again through chat bar dots menu',
34+
'Upload the same file again through Files manager',
3635
async () => {
37-
await dialHomePage.openHomePage();
38-
await dialHomePage.waitForPageLoaded();
39-
await chatBar.openManageAttachmentsModal();
40-
await baseAssertion.assertElementState(
41-
filesManagerModalGrid.gridRowByNameCell(Attachment.longImageName),
36+
await filesManagerPage.openFilesManagerPage();
37+
await filesManagerPage.waitForPageLoaded();
38+
await filesManagerGridAssertion.assertGridRowByNameState(
39+
Attachment.longImageName,
4240
'visible',
4341
);
44-
await dialHomePage.uploadData(
42+
await filesManagerToolbar.getNewButton().click();
43+
await filesManagerPage.uploadData(
4544
{ path: Attachment.longImageName, dataType: 'upload' },
46-
() => filesManagerModal.openUploadFromDevice(),
45+
() =>
46+
filesManagerToolbar
47+
.getNewButtonDropdownMenu()
48+
.selectItem(UploadMenuOptions.uploadFiles),
4749
);
4850
await fileConflictConfirmationPopupAssertion.assertConfirmationPopupHeader(
4951
ExpectedConstants.replaceAttachmentConfirmationTitle,
@@ -54,8 +56,8 @@ dialTest(
5456
),
5557
);
5658
await fileConflictConfirmationPopup.getCancelButton().click();
57-
await baseAssertion.assertElementState(
58-
filesManagerModalGrid.gridRowByNameCell(Attachment.longImageName),
59+
await filesManagerGridAssertion.assertGridRowByNameState(
60+
Attachment.longImageName,
5961
'visible',
6062
);
6163
},

apps/chat-e2e/src/tests/overlay/headerFeature.test.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ dialOverlayTest(
142142
overlayProfilePanel,
143143
overlayRequestApiKeyModal,
144144
overlayReportAnIssueModal,
145-
overlayAttachFilesModal,
146145
overlayChatMessages,
147146
overlayBaseAssertion,
148147
overlayConversationAssertion,
@@ -227,18 +226,12 @@ dialOverlayTest(
227226
);
228227

229228
await dialTest.step(
230-
'Verify "Manage attachments" modal is opened on click "Clip" in the bottom menu',
229+
'Verify "Clip" icon is not visible at the bottom menu',
231230
async () => {
232231
await overlayBaseAssertion.assertElementState(
233232
overlayChatBar.attachments,
234-
'visible',
235-
);
236-
await overlayChatBar.openManageAttachmentsModal();
237-
await overlayBaseAssertion.assertElementState(
238-
overlayAttachFilesModal,
239-
'visible',
233+
'hidden',
240234
);
241-
await overlayAttachFilesModal.closeButton.click();
242235
},
243236
);
244237

apps/chat-e2e/src/tests/sidePanels.test.ts

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { CENTRAL_CHAT_MIN_WIDTH } from '@/chat/constants/chat';
22
import { SIDEBAR_MIN_WIDTH } from '@/chat/constants/default-ui-settings';
33
import dialTest from '@/src/core/dialFixtures';
4-
import { ExpectedConstants, ExpectedMessages } from '@/src/testData';
4+
import { ExpectedMessages } from '@/src/testData';
55
import { Colors, Styles } from '@/src/ui/domData';
66
import { expect } from '@playwright/test';
77

@@ -52,9 +52,9 @@ dialTest(
5252
setTestIds,
5353
appContainer,
5454
chatBar,
55+
chatBarAssertion,
5556
promptBar,
5657
header,
57-
tooltip,
5858
conversationData,
5959
dataInjector,
6060
localStorageManager,
@@ -105,28 +105,16 @@ dialTest(
105105
);
106106

107107
await dialTest.step(
108-
'Verify Attachment icon is visible at the panel bottom menu',
108+
'Verify Attachment icon is not visible at the panel bottom menu',
109109
async () => {
110-
await chatBar.attachments.waitForState();
111-
await expect
112-
.soft(
113-
chatBar.bottomDotsMenuIcon.getElementLocator(),
114-
ExpectedMessages.dotsMenuIsHidden,
115-
)
116-
.toBeHidden();
117-
118-
await chatBar.attachments.hoverOver();
119-
const iconTooltip = await tooltip.getContent();
120-
expect
121-
.soft(iconTooltip, ExpectedMessages.tooltipContentIsValid)
122-
.toBe(ExpectedConstants.attachments);
123-
124-
const iconColor = await chatBar.attachments.getComputedStyleProperty(
125-
Styles.color,
110+
await chatBarAssertion.assertElementState(
111+
chatBar.attachments,
112+
'hidden',
113+
);
114+
await chatBarAssertion.assertElementState(
115+
chatBar.bottomDotsMenuIcon,
116+
'hidden',
126117
);
127-
expect
128-
.soft(iconColor[0], ExpectedMessages.iconColorIsValid)
129-
.toBe(Colors.textAccentSecondary);
130118
},
131119
);
132120

apps/chat/src/components/Chatbar/ChatbarSettings.tsx

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
IconFileArrowLeft,
33
IconFileArrowRight,
4-
IconPaperclip,
54
IconScale,
65
IconSquareCheck,
76
IconSquareOff,
@@ -23,11 +22,7 @@ import {
2322
UIActions,
2423
} from '@/src/store/actions';
2524
import { useAppDispatch, useAppSelector } from '@/src/store/hooks';
26-
import {
27-
ConversationsSelectors,
28-
SettingsSelectors,
29-
UISelectors,
30-
} from '@/src/store/selectors';
25+
import { ConversationsSelectors, UISelectors } from '@/src/store/selectors';
3126

3227
import { DEFAULT_CONVERSATION_NAME } from '@/src/constants/default-ui-settings';
3328
import { PINNED_CONVERSATIONS_SECTION_NAME } from '@/src/constants/sections';
@@ -38,7 +33,7 @@ import { FileManagerModal } from '@/src/components/Files/FileManagerModal';
3833
import { Import } from '@/src/components/Settings/Import';
3934

4035
import FolderPlus from '@/public/images/icons/folder-plus.svg';
41-
import { Feature, SupportedExportFormats } from '@epam/ai-dial-shared';
36+
import { SupportedExportFormats } from '@epam/ai-dial-shared';
4237

4338
export const ChatbarSettings = () => {
4439
const { t } = useTranslation(Translation.SideBar);
@@ -50,9 +45,6 @@ export const ChatbarSettings = () => {
5045
const isStreaming = useAppSelector(
5146
ConversationsSelectors.selectIsConversationsStreaming,
5247
);
53-
const enabledFeatures = useAppSelector(
54-
SettingsSelectors.selectEnabledFeatures,
55-
);
5648
const [isSelectFilesDialogOpened, setIsSelectFilesDialogOpened] =
5749
useState(false);
5850
const isMyItemsExist = useAppSelector(
@@ -190,25 +182,13 @@ export const ChatbarSettings = () => {
190182
},
191183
display: !isSelectMode,
192184
},
193-
{
194-
name: t('Attachments'),
195-
display:
196-
enabledFeatures.has(Feature.AttachmentsManager) && !isSelectMode,
197-
dataQa: 'attachments',
198-
Icon: IconPaperclip,
199-
disabled: isStreaming,
200-
onClick: () => {
201-
setIsSelectFilesDialogOpened(true);
202-
},
203-
},
204185
],
205186
[
206187
t,
207188
isMyItemsExist,
208189
isStreaming,
209190
isSelectMode,
210191
deleteTerm,
211-
enabledFeatures,
212192
dispatch,
213193
collapsedSections,
214194
jsonImportHandler,

apps/chat/src/components/Common/SliderGrid/SliderDots.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export const SliderDots: React.FC<Props> = ({
122122
<div className="flex flex-col items-center md:h-5 md:w-1/2 md:flex-row md:justify-between">
123123
<div className="relative z-40 flex items-center gap-4 md:-translate-x-1/2">
124124
{sliderDotsArray.length <= 1 && screenState === ScreenState.SM && (
125-
<span className="h-[18px] bg-transparent"></span>
125+
<span className="h-[8px] bg-transparent"></span>
126126
)}
127127
{sliderDotsArray.length > 1 && (
128128
<>

apps/chat/src/components/Markdown/ChatMDComponent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ const getMDComponents = (
139139
return (
140140
<details
141141
className={classnames(
142-
'my-4 rounded bg-layer-3 [&_details]:bg-layer-1 [&_details_details]:bg-layer-3',
143-
' [&>summary]:border-tertiary [&[open]>summary>svg]:rotate-180 [&[open]>summary]:border-b [&_details>summary]:border-secondary [&_details_details>summary]:border-tertiary',
142+
'rounded bg-layer-3 [&_details]:bg-layer-1 [&_details_details]:bg-layer-3',
143+
' [&>summary]:border-tertiary [&[open]>summary>svg]:rotate-180 [&[open]>summary]:border-b [&_.codeblock>*]:!bg-layer-1 [&_details>summary]:border-secondary [&_details]:border [&_details]:border-secondary [&_details_.codeblock>*]:!bg-layer-3 [&_details_.codeblock>div]:border-tertiary [&_details_.codeblock]:border-0 [&_details_details>summary]:border-tertiary [&_details_details]:border-0 [&_details_details_.codeblock>*]:!bg-layer-1 [&_details_details_.codeblock>div]:border-secondary [&_details_details_.codeblock]:border',
144144
)}
145145
{...props}
146146
>

apps/chat/src/components/Marketplace/AddMarketplaceEntityButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function AddMarketplaceEntityButton({
6060
placement="bottom"
6161
TriggerCustomRenderer={
6262
<DialButton
63-
className="shrink-0"
63+
className="shrink-0 focus:border-transparent"
6464
variant={ButtonVariant.Primary}
6565
data-qa={dataQa}
6666
label={isScreenSmall ? t('Add') : t(`Add ${label}`)}

apps/chat/src/hooks/useFileManagerActionLabels.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ const DEFAULT_TAB_ACTIONS: ActionsByTab = {
4040
DialFileManagerActions.Delete,
4141
DialFileManagerActions.Info,
4242
],
43-
organization: [DialFileManagerActions.Download, DialFileManagerActions.Info],
43+
organization: [
44+
DialFileManagerActions.Download,
45+
DialFileManagerActions.Info,
46+
DialFileManagerActions.Delete,
47+
],
4448
};
4549

4650
const buildLabelMap = (actions: FileAction[], t: TranslationFn) =>

0 commit comments

Comments
 (0)