Introducing a loading route prevents query params from being resolved in an acceptance test
- Dominant language
- TypeScript
- Stars
- 22.6k
- Forks
- 4.2k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 15
Description
@lifeart has found this bug.
## Steps to reproduce
```
git clone git@github.com:ember-learn/ember-api-docs.git
cd ember-api-docs/
git co 542b6065553ac6849635865e84c7b96f77c72261
bower i
yarn
ember t -s --no-launch -f 'has query params for access visibilities'
```
Open http://http://localhost:7357 and you can see tests pass.
Now create a loading route:
ember g template project-version/classes/class-loading
And the test will fail. The app for a normal user behaves correctly.
## Debugging
1. Drop `debugger`s [here](https://github.com/ember-learn/ember-api-docs/blob/542b6065553ac6849635865e84c7b96f77c72261/tests/acceptance/class-test.js#L41) and [here](https://github.com/ember-learn/ember-api-docs/blob/542b6065553ac6849635865e84c7b96f77c72261/app/mixins/filter-params.js#L34).
2. Comment out all content of the `has query params for access visibilities` test and comment out all clicks from the `beforeEach` hook.
When you don't have the loading route, the `visibilityFilter` setter fires before the acceptance test.
When you introduced the loading route, the `visibilityFilter` setter is never fired.
Contributor guide
Assessment
This issue has not been assessed yet.