Skip to content

Create feature spec for loading error details page

What does this MR do?

Overview

This MR tests the error show and details page.

The error tracking index page displays a list of errors based off a call to the sentry api to get a list of issues.

The error tracking show page displays a single error with its stack trace details. Each line of the stack trace has an expandable context which shows other lines. This MR test that the first line is expanded by default and that a if a line is clicked that line expands as well.

Technical overview

I stubbed all requests to the sentry api to remove all external dependencies.

Issue index stubs

  • sentry endpoint for list of issues

Issue show stubs

  • sentry endpoint for a single issue
  • sentry endpoint for an issues latest event

I also disabled reactive caching using the ReactiveCachingHelper since it simplifies the tests and we have tests for that elsewhere. In order to disable reactive caching we have to mock methods on the ProjectErrorTrackingSetting class and the ensure that the controller returns the instance of the model with those methods mocked and not a new instance based on querying the database.

I used :use_clean_rails_memory_store_caching, :sidekiq_might_not_need_inline traits to test the reactive cache.

Part of #36695 (closed)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Allison Browne

Merge request reports