Skip to content

Commit

Permalink
button is now a link
Browse files Browse the repository at this point in the history
  • Loading branch information
scttcper committed Sep 27, 2024
1 parent 12da6b5 commit 7b68bb4
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions static/app/components/events/eventAttachments.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import {ConfigFixture} from 'sentry-fixture/config';
import {EventFixture} from 'sentry-fixture/event';
import {EventAttachmentFixture} from 'sentry-fixture/eventAttachment';
import {GroupFixture} from 'sentry-fixture/group';
import {UserFixture} from 'sentry-fixture/user';

import {initializeOrg} from 'sentry-test/initializeOrg';
import {
Expand All @@ -27,7 +25,6 @@ describe('EventAttachments', function () {
});
const event = EventFixture({metadata: {stripped_crash: false}});

const defaultUser = UserFixture();
const props = {
group: undefined,
project: project,
Expand Down Expand Up @@ -194,39 +191,4 @@ describe('EventAttachments', function () {
expect(screen.queryByTestId('pic_1.png')).not.toBeInTheDocument();
});
});

it('can open the group attachments drawer', async function () {
const group = GroupFixture();
const attachment1 = EventAttachmentFixture();
MockApiClient.addMockResponse({
url: attachmentsUrl,
body: [attachment1],
});
MockApiClient.addMockResponse({
url: `/organizations/${organization.slug}/issues/${group.id}/attachments/`,
body: [attachment1],
});

// Enable streamlined UI
ConfigStore.set(
'user',
UserFixture({
...defaultUser,
options: {
...defaultUser.options,
prefersIssueDetailsStreamlinedUI: true,
},
})
);

render(<EventAttachments {...props} group={group} />, {router, organization});

expect(await screen.findByText('Attachments (1)')).toBeInTheDocument();
expect(screen.queryByRole('dialog')).not.toBeInTheDocument();

await userEvent.click(screen.getByRole('button', {name: 'View All Attachments'}));
expect(
await screen.findByRole('complementary', {name: 'attachments drawer'})
).toBeInTheDocument();
});
});

0 comments on commit 7b68bb4

Please sign in to comment.