Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import { IconWithCount } from './icon_with_count';

describe('IconWithCount', () => {
it('renders component correctly', () => {
const res = render(<IconWithCount count={5} icon={'editorComment'} />);
const res = render(<IconWithCount count={5} icon={'comment'} />);

expect(res.getByTestId('comment-count-icon')).toBeInTheDocument();
});

it('renders count correctly', () => {
const res = render(<IconWithCount count={100} icon={'editorComment'} />);
const res = render(<IconWithCount count={100} icon={'comment'} />);

expect(res.getByText(100)).toBeInTheDocument();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const CaseTooltipContentComponent = React.memo<CaseTooltipContentProps>(
<EuiFlexItem grow={false}>
<Status status={status} />
</EuiFlexItem>
<IconWithCount count={totalComments} icon={'editorComment'} />
<IconWithCount count={totalComments} icon={'comment'} />
</EuiFlexGroup>
<EuiFlexGroup direction="column" gutterSize="xs">
<EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const NoSelectedAssigneesComponent: React.FC<{ totalSelectedCases: number }> = (
data-test-subj="case-user-profiles-assignees-no-selected-assignees"
>
<EuiFlexItem grow={false}>
<EuiIcon type="userAvatar" size="xl" />
<EuiIcon type="user" size="xl" />
<EuiSpacer size="xs" />
</EuiFlexItem>
<EuiFlexItem grow={false}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('useAssigneesAction', () => {
"disabled": false,
"icon": <EuiIcon
size="m"
type="userAvatar"
type="user"
/>,
"key": "cases-bulk-action-assignees",
"name": "Edit assignees",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const useAssigneesAction = ({ onAction, onActionSuccess, isDisabled }: Us
onClick: () => openFlyout(selectedCases),
disabled: isActionDisabled,
'data-test-subj': 'cases-bulk-action-assignees',
icon: <EuiIcon type="userAvatar" size="m" />,
icon: <EuiIcon type="user" size="m" />,
key: 'cases-bulk-action-assignees',
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('useCopyIDAction', () => {
"data-test-subj": "cases-action-copy-id",
"icon": <EuiIcon
size="m"
type="copyClipboard"
type="copy"
/>,
"key": "cases-action-copy-id",
"name": <EuiTextColor>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const useCopyIDAction = ({ onActionSuccess }: UseCopyIDActionProps) => {
});
},
'data-test-subj': 'cases-action-copy-id',
icon: <EuiIcon type="copyClipboard" size="m" />,
icon: <EuiIcon type="copy" size="m" />,
key: 'cases-action-copy-id',
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export const AddComment = React.memo(
<EuiButton
data-test-subj="submit-comment"
fill
iconType="plusInCircle"
iconType="plusCircle"
isDisabled={isDisabled}
isLoading={isLoading}
onClick={onSubmit}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const AssigneesFilterPopoverComponent: React.FC<AssigneesFilterPopoverProps> = (
button={
<EuiFilterButton
data-test-subj="options-filter-popover-button-assignees"
iconType="arrowDown"
iconType="chevronSingleDown"
onClick={togglePopover}
isLoading={isLoadingData}
isSelected={isPopoverOpen}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export const ColumnsPopover: React.FC<Props> = ({
aria-label={i18n.DRAG_HANDLE}
grow={false}
>
<EuiIcon type="grab" color="subdued" />
<EuiIcon type="dragVertical" color="subdued" />
</EuiPanel>
</EuiFlexItem>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const MultiSelectFilter = <T extends string, K extends string = string>({
${buttonCss}
`}
data-test-subj={`options-filter-popover-button-${id}`}
iconType={buttonIconType || 'arrowDown'}
iconType={buttonIconType || 'chevronSingleDown'}
onClick={toggleIsPopoverOpen}
isSelected={isPopoverOpen}
numFilters={showActiveOptionsNumber ? options.length : undefined}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const NavButtons: FunctionComponent<Props> = ({ actionsErrors }) => {
fill
onClick={navigateToCreateCaseClick}
href={getCreateCaseUrl()}
iconType="plusInCircle"
iconType="plusCircle"
data-test-subj="createNewCaseBtn"
>
{i18n.CREATE_CASE_TITLE}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const CasesTable: FunctionComponent<CasesTableProps> = ({
size="s"
onClick={navigateToCreateCaseClick}
href={getCreateCaseUrl()}
iconType="plusInCircle"
iconType="plusCircle"
data-test-subj="cases-table-add-case"
>
{i18n.CREATE_CASE_TITLE}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const CasesTableFiltersComponent = ({
<EuiButton
fill
onClick={handleOnCreateCasePressed}
iconType="plusInCircle"
iconType="plusCircle"
data-test-subj="cases-table-add-case-filter-bar"
>
{i18n.CREATE_CASE_TITLE}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const ActionColumnComponent: React.FC<{ theCase: CaseUI; disableActions: boolean
button={
<EuiButtonIcon
onClick={tooglePopover}
iconType="boxesHorizontal"
iconType="boxesVertical"
Comment thread
christineweng marked this conversation as resolved.
aria-label={i18n.ACTIONS_BUTTON_ARIA_LABEL(theCase.title)}
color="text"
key={`case-action-popover-button-${theCase.id}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('useBulkActions', () => {
"disabled": false,
"icon": <EuiIcon
size="m"
type="userAvatar"
type="user"
/>,
"key": "cases-bulk-action-assignees",
"name": "Edit assignees",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export const CasesTableUtilityBar: FunctionComponent<Props> = React.memo(
onClick={togglePopover}
size="xs"
iconSide="right"
iconType="arrowDown"
iconType="chevronSingleDown"
flush="left"
data-test-subj="case-table-bulk-actions-link-icon"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ export function useReadonlyHeader() {
const { permissions } = useCasesContext();
const chrome = useKibana().services.chrome;

// if the user is read only then display the glasses badge in the global navigation header
// if the user is read only then display the readOnly badge in the global navigation header
const setBadge = useCallback(() => {
if (isReadOnlyPermissions(permissions)) {
chrome.setBadge({
text: i18n.READ_ONLY_BADGE_TEXT,
tooltip: i18n.READ_ONLY_BADGE_TOOLTIP,
iconType: 'glasses',
iconType: 'readOnly',
Comment thread
christineweng marked this conversation as resolved.
});
}
}, [chrome, permissions]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const UserActionShowAlertComponent = ({
aria-label={i18n.SHOW_ALERT_TOOLTIP}
data-test-subj={`comment-action-show-alert-${id}`}
onClick={onClick}
iconType="arrowRight"
iconType="chevronSingleRight"
id={`${id}-show-alert`}
/>
</EuiToolTip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const UserActionShowEventComponent = ({
aria-label={i18n.SHOW_EVENT_TOOLTIP}
data-test-subj={`comment-action-show-event-${id}`}
onClick={onClick}
iconType="arrowRight"
iconType="chevronSingleRight"
id={`${id}-show-event`}
/>
</EuiToolTip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const AddFileComponent: React.FC<AddFileProps> = ({ caseId }) => {
<EuiFlexItem grow={false}>
<EuiButton
data-test-subj="cases-files-add"
iconType="plusInCircle"
iconType="plusCircle"
isDisabled={isLoading}
isLoading={isLoading}
onClick={showModal}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const FileActionsPopoverButton: React.FC<{ caseId: string; theFile: FileJ
theFile.hash?.md5
? {
name: 'MD5',
icon: 'copyClipboard',
icon: 'copy',
onClick: () => {
if (theFile.hash?.md5) {
navigator.clipboard.writeText(theFile.hash.md5).then(() => {
Expand All @@ -84,7 +84,7 @@ export const FileActionsPopoverButton: React.FC<{ caseId: string; theFile: FileJ
theFile.hash?.sha1
? {
name: 'SHA1',
icon: 'copyClipboard',
icon: 'copy',
onClick: () => {
if (theFile.hash?.sha1) {
navigator.clipboard.writeText(theFile.hash.sha1).then(() => {
Expand All @@ -99,7 +99,7 @@ export const FileActionsPopoverButton: React.FC<{ caseId: string; theFile: FileJ
theFile.hash?.sha256
? {
name: 'SHA256',
icon: 'copyClipboard',
icon: 'copy',
onClick: () => {
if (theFile.hash?.sha256) {
navigator.clipboard.writeText(theFile.hash.sha256).then(() => {
Expand All @@ -118,7 +118,7 @@ export const FileActionsPopoverButton: React.FC<{ caseId: string; theFile: FileJ
if (fileHashesAvailable) {
mainPanelItems.push({
name: i18n.COPY_FILE_HASH,
icon: 'copyClipboard',
icon: 'copy',
panel: 1,
'data-test-subj': 'cases-files-copy-hash-button',
});
Expand Down Expand Up @@ -158,7 +158,7 @@ export const FileActionsPopoverButton: React.FC<{ caseId: string; theFile: FileJ
button={
<EuiButtonIcon
onClick={tooglePopover}
iconType="boxesHorizontal"
iconType="boxesVertical"
aria-label={i18n.ACTIONS}
color="text"
key={`cases-files-actions-popover-button-${theFile.id}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('CaseView actions', () => {
expect(wrapper.find('[data-test-subj="confirm-delete-case-modal"]').exists()).toBeTruthy();
});

it('clicking copyClipboard icon copies case id', () => {
it('clicking copy icon copies case id', () => {
const originalClipboard = global.window.navigator.clipboard;

Object.defineProperty(navigator, 'clipboard', {
Expand All @@ -74,7 +74,7 @@ describe('CaseView actions', () => {
.find('button[data-test-subj="property-actions-case-ellipses"]')
.first()
.simulate('click');
wrapper.find('button[data-test-subj="property-actions-case-copyClipboard"]').simulate('click');
wrapper.find('button[data-test-subj="property-actions-case-copy"]').simulate('click');
Comment thread
christineweng marked this conversation as resolved.

expect(navigator.clipboard.writeText).toHaveBeenCalledWith(basicCase.id);

Expand All @@ -96,9 +96,7 @@ describe('CaseView actions', () => {
.first()
.simulate('click');
expect(wrapper.find('[data-test-subj="property-actions-case-trash"]').exists()).toBeFalsy();
expect(
wrapper.find('[data-test-subj="property-actions-case-copyClipboard"]').exists()
).toBeTruthy();
expect(wrapper.find('[data-test-subj="property-actions-case-copy"]').exists()).toBeTruthy();
});

it('toggle delete modal and confirm', async () => {
Expand Down Expand Up @@ -145,7 +143,7 @@ describe('CaseView actions', () => {
.first()
.simulate('click');
expect(
wrapper.find('[data-test-subj="property-actions-case-popout"]').first().prop('aria-label')
wrapper.find('[data-test-subj="property-actions-case-external"]').first().prop('aria-label')
).toEqual(i18n.VIEW_INCIDENT(basicPush.externalTitle));
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const ActionsComponent: React.FC<CaseViewActions> = ({ caseData, currentExternal
() => [
{
type: AttachmentActionType.BUTTON as const,
iconType: 'copyClipboard',
iconType: 'copy',
label: i18n.COPY_ID_ACTION_LABEL,
onClick: () => {
navigator.clipboard.writeText(caseData.id);
Expand All @@ -54,7 +54,7 @@ const ActionsComponent: React.FC<CaseViewActions> = ({ caseData, currentExternal
? [
{
type: AttachmentActionType.BUTTON as const,
iconType: 'popout',
iconType: 'external',
label: i18n.VIEW_INCIDENT(currentExternalIncident?.externalTitle ?? ''),
onClick: () => window.open(currentExternalIncident?.externalUrl, '_blank'),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ describe('CaseActionBar', () => {
await userEvent.click(screen.getByTestId('property-actions-case-ellipses'));
expect(screen.queryByText('Delete case')).not.toBeInTheDocument();
expect(screen.queryByTestId('property-actions-case-trash')).not.toBeInTheDocument();
expect(screen.getByTestId('property-actions-case-copyClipboard')).toBeInTheDocument();
expect(screen.getByTestId('property-actions-case-copy')).toBeInTheDocument();
});

it('should show the the delete item in the menu when the user does have delete privileges', async () => {
Expand All @@ -183,7 +183,7 @@ describe('CaseActionBar', () => {
await userEvent.click(screen.getByTestId('property-actions-case-ellipses'));

await waitFor(() => {
expect(screen.getByTestId('property-actions-case-popout')).toBeInTheDocument();
expect(screen.getByTestId('property-actions-case-external')).toBeInTheDocument();
});
});

Expand All @@ -192,6 +192,6 @@ describe('CaseActionBar', () => {

await userEvent.click(screen.getByTestId('property-actions-case-ellipses'));

expect(screen.queryByTestId('property-actions-case-popout')).not.toBeInTheDocument();
expect(screen.queryByTestId('property-actions-case-external')).not.toBeInTheDocument();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const renderUsers = (
<EuiButtonIcon
data-test-subj="user-list-email-button"
onClick={handleSendEmail.bind(null, userInfo.user?.email)}
iconType="email"
iconType="mail"
aria-label={i18n.SEND_EMAIL_ARIA(
userInfo.user?.full_name ? userInfo.user?.full_name : userInfo.user?.username ?? ''
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('ConnectorsDropdown', () => {
<EuiIcon
css="unknown styles"
size="m"
type="minusInCircle"
type="minusCircle"
/>
</EuiFlexItem>
<EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const noConnectorOption = {
margin-right: 13px;
margin-bottom: 0 !important;
`}
type="minusInCircle"
type="minusCircle"
size={ICON_SIZE}
/>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const SubmitCaseButtonComponent: React.FC<SubmitCaseButtonComponentProps> = ({ i
tour-step="create-case-submit"
data-test-subj="create-case-submit"
fill
iconType="plusInCircle"
iconType="plusCircle"
isDisabled={isSubmitting}
isLoading={isSubmitting}
onClick={submit}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const CustomFieldsListComponent: React.FC<Props> = (props) => {
<EuiButtonIcon
data-test-subj={`${customField.key}-custom-field-delete`}
aria-label={`${customField.key}-custom-field-delete`}
iconType="minusInCircle"
iconType="minusCircle"
color="danger"
onClick={() => setSelectedItem(customField)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const CustomFieldsComponent: React.FC<Props> = ({
isDisabled={disabled || error}
size="s"
onClick={onAddCustomField}
iconType="plusInCircle"
iconType="plusCircle"
data-test-subj="add-custom-field"
>
{i18n.ADD_CUSTOM_FIELD}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const PushButtonComponent: React.FC<PushButtonProps> = ({
const button = (
<EuiButtonEmpty
data-test-subj="push-to-external-service"
iconType="importAction"
iconType="download"
onClick={pushToService}
disabled={disabled}
isLoading={isLoading}
Expand Down
Loading
Loading