Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SIEM] Remove placeholder from pinned event tooltips #52361

Merged
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 @@ -203,28 +203,22 @@ describe('helpers', () => {
});

describe('getPinTooltip', () => {
test('it informs the user the event may not be unpinned when the event is pinned and has notes', () => {
test('it indicates the event may NOT be unpinned when `isPinned` is `true` and the event has notes', () => {
expect(getPinTooltip({ isPinned: true, eventHasNotes: true })).toEqual(
'This event cannot be unpinned because it has notes'
);
});

test('it tells the user the event is persisted when the event is pinned, but has no notes', () => {
expect(getPinTooltip({ isPinned: true, eventHasNotes: false })).toEqual(
'This event is persisted with the timeline'
);
test('it indicates the event is pinned when `isPinned` is `true` and the event does NOT have notes', () => {
expect(getPinTooltip({ isPinned: true, eventHasNotes: false })).toEqual('Pinned event');
});

test('it tells the user the event is NOT persisted when the event is not pinned, but it has notes', () => {
expect(getPinTooltip({ isPinned: false, eventHasNotes: true })).toEqual(
'This is event is NOT persisted with the timeline'
);
test('it indicates the event is NOT pinned when `isPinned` is `false` and the event has notes', () => {
expect(getPinTooltip({ isPinned: false, eventHasNotes: true })).toEqual('Unpinned event');
});

test('it tells the user the event is NOT persisted when the event is not pinned, and has no notes', () => {
expect(getPinTooltip({ isPinned: false, eventHasNotes: false })).toEqual(
'This is event is NOT persisted with the timeline'
);
test('it indicates the event is NOT pinned when `isPinned` is `false` and the event does NOT have notes', () => {
expect(getPinTooltip({ isPinned: false, eventHasNotes: false })).toEqual('Unpinned event');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ export const COPY_TO_CLIPBOARD = i18n.translate(
);

export const UNPINNED = i18n.translate('xpack.siem.timeline.body.pinning.unpinnedTooltip', {
defaultMessage: 'This is event is NOT persisted with the timeline',
defaultMessage: 'Unpinned event',
});

export const PINNED = i18n.translate('xpack.siem.timeline.body.pinning.pinnedTooltip', {
defaultMessage: 'This event is persisted with the timeline',
defaultMessage: 'Pinned event',
});

export const PINNED_WITH_NOTES = i18n.translate(
Expand Down