mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import {DataScrubbingRelayPiiConfigFixture} from 'sentry-fixture/dataScrubbingRelayPiiConfig';
|
|
import {EventFixture} from 'sentry-fixture/event';
|
|
|
|
import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary';
|
|
import {textWithMarkupMatcher} from 'sentry-test/utils';
|
|
|
|
import {EventSdk} from 'sentry/components/events/eventSdk';
|
|
|
|
describe('event sdk', function () {
|
|
it('display redacted tags', async function () {
|
|
const event = EventFixture({
|
|
sdk: {
|
|
name: 'sentry.cocoa',
|
|
version: '',
|
|
},
|
|
_meta: {
|
|
sdk: {
|
|
version: {'': {rem: [['organization:0', 'x']]}},
|
|
},
|
|
},
|
|
});
|
|
|
|
render(<EventSdk sdk={event.sdk} meta={event._meta?.sdk} />, {
|
|
organization: {
|
|
relayPiiConfig: JSON.stringify(DataScrubbingRelayPiiConfigFixture()),
|
|
},
|
|
});
|
|
|
|
await userEvent.hover(screen.getByText(/redacted/));
|
|
expect(
|
|
await screen.findByText(
|
|
textWithMarkupMatcher(
|
|
"Removed because of the data scrubbing rule [Replace] [Password fields] with [Scrubbed] from [password] in your organization's settings"
|
|
)
|
|
)
|
|
).toBeInTheDocument(); // tooltip description
|
|
});
|
|
});
|