Mocking get-requests in frontend tests sometimes results in empty arrays instead of the configured JSON content

Steps to reproduce

Steps to reproduce:
1. When mocking get-requests in frontend tests using getJSONFixture(Path), the JSON in the response is already parsed into an object or array, contrarily to a real request, where the response will contain a string yet to be parsed. (See bulkDeleteControllerSpec.js for an example.)
2. When trying to parse the JSON for a second time, some ressources fail silently (e.g. by swallow the exception) and return an empty array or similar instead of the expected JSON content (for example newEventProcessingRessource.js).
3. It is unclear how many tests and ressources are affected.

Actual Results: An Empty Array or similar.

Expected Results: The content of the configured json file used for testing.

Desired Behaviour:
1. Mocked Responses in frontend tests should contain a string instead of an already parsed JSON-Object.
2. Ressources shouldn't swallow exceptions when parsing as a JSON fails.

Workaround (if any): -

Status

Assignee

Katrin Ihler

Reporter

Katrin Ihler

Severity

Tests

Tags (folksonomy)

None

Components

Fix versions

Affects versions

Priority

Minor
Configure