CentreForDigitalHumanities / CentreForDigitalHumanities/Textcavator

Get corpus mock data in common-test-bed working again

Open
#851 1 comment 0 reactions 0 assignees View on GitHub
code quality
Dominant language
Python
Stars
12
Forks
3
Avg merge
3d 3m
Merged PRs (30d)
9

Description

The introduction of the `param-directive` made it necessary to use Angular's [RouterTestingModule](https://angular.io/api/router/testing/RouterTestingModule) in lieu of the `ActivatedRoute` provider we had before:
```
{
provide: ActivatedRoute, useValue: {
paramMap: of(<{ corpus: corpus.MockCorpusName }>{ corpus: 'test1' }).subscribe(convertToParamMap)
}},
```
Find out how to make sure that we simulate the route being on "test1", so tested components will correctly retrieve that corpus from the `ApiServiceMock` again. Perhaps [this article](https://dev.to/this-is-angular/testing-angular-routing-components-with-the-routertestingmodule-4cj0) can help?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.