Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Routing tests #149

Open
JulianEgbert opened this issue Jan 10, 2022 · 1 comment
Open

Improve Routing tests #149

JulianEgbert opened this issue Jan 10, 2022 · 1 comment
Labels
enhancement New feature or request T.O.B.I.A.S. (TF1 & TF2)

Comments

@JulianEgbert
Copy link
Contributor

JulianEgbert commented Jan 10, 2022

"Mock" routing API

For the tests that involve routing we should mock the external API response. That would allow for better testing of (for example) the time label.
It's also indepentent of the API which is good for GitHub Actions testing.

Improve target test

Catch invalid inputs that are no coordinates.

@JulianEgbert JulianEgbert added enhancement New feature or request T.O.B.I.A.S. (TF1 & TF2) labels Jan 10, 2022
@JulianEgbert JulianEgbert changed the title "Mock" the routing API Improve Routing tests Jan 10, 2022
@JulianEgbert
Copy link
Contributor Author

This shouldn't be that difficult because for the mocking part we have our own backend call that is requested by the frontend to then ask the API.
So we would just need to mock this one method.

For the other test it's just a simple method.

I just made an extra issue to not overload the PR #137

JulianEgbert added a commit that referenced this issue Jan 11, 2022
Refactor leaflet ruby gem to plain js.
This merge will remove the map on the location show page, as communicated with team @hpi-swt2/apmw21.
We moved functionality from server to client.

Coverage will be restored with Issue #149.

* Start working on refactoring to js

* Refactor map elements to js

* Remove style from head

* removed brackets as suggested

* Fix variable erroneously dumped to page

fixes Places::DESTINATIONS variable being dumped into HTML (introduced in #102)

* Restore package-lock.json and other feedback

* First steps on new js conversion

Co-authored-by: TheGrayStone <[email protected]>
Co-authored-by: Julian Schmidt <[email protected]>

* Refactor routing display

* Add Route to its own layer

* Trying to fix tests with js

* Comment on old magic constant

* Adapt tests for routing

* linting stuff

* Remove test for targets, minor fixes

* [CodeFactor] Apply fixes

* Remove old map from locations, needs more fixing

* Extra js file for leaflet Map

* prepare locations show

* Remove map from location page

* add debugging help to routing tests

* add waiting time for routing

* remove unnecessary code

* adding wait_for_ajax to route tests

* Remove old unused code (Commented for target)

* tag tests and improve backend routes

* improved tagging to new syntax

* exclude tests with the tag "local_only"

* add jQuery as requested

* code cleanup for jQuery

* enable indoor rooms from hg

* add target marker functionality

* remove old variable on index

* [CodeFactor] Apply fixes

* a try on fixing tests

* [CodeFactor] Apply fixes

* fix CodeFactor issue

* improve tests with find and waiting time

* edit tags for tests

* remove parallel execution in js

* remove wait_for_ajax

* run route tests only local

* restore yarn.lock

* add newline to yarn.lock

* Code improvements

* [CodeFactor] Apply fixes

* Fix magic string

* possible fix for routing tests

* Parallelize ajax requests

Co-authored-by: Julian Schmidt

* reverse changes for parallel ajax

* add comment about race condition

* Paralize ajax requests WITH tests

* remove tests for routing (race condition)

Co-authored-by: Lukas Rost <[email protected]>
Co-authored-by: TheGrayStone <[email protected]>
Co-authored-by: Julian Schmidt <[email protected]>
Co-authored-by: codefactor-io <[email protected]>
Tratori pushed a commit that referenced this issue Jan 29, 2022
Refactor leaflet ruby gem to plain js.
This merge will remove the map on the location show page, as communicated with team @hpi-swt2/apmw21.
We moved functionality from server to client.

Coverage will be restored with Issue #149.

* Start working on refactoring to js

* Refactor map elements to js

* Remove style from head

* removed brackets as suggested

* Fix variable erroneously dumped to page

fixes Places::DESTINATIONS variable being dumped into HTML (introduced in #102)

* Restore package-lock.json and other feedback

* First steps on new js conversion

Co-authored-by: TheGrayStone <[email protected]>
Co-authored-by: Julian Schmidt <[email protected]>

* Refactor routing display

* Add Route to its own layer

* Trying to fix tests with js

* Comment on old magic constant

* Adapt tests for routing

* linting stuff

* Remove test for targets, minor fixes

* [CodeFactor] Apply fixes

* Remove old map from locations, needs more fixing

* Extra js file for leaflet Map

* prepare locations show

* Remove map from location page

* add debugging help to routing tests

* add waiting time for routing

* remove unnecessary code

* adding wait_for_ajax to route tests

* Remove old unused code (Commented for target)

* tag tests and improve backend routes

* improved tagging to new syntax

* exclude tests with the tag "local_only"

* add jQuery as requested

* code cleanup for jQuery

* enable indoor rooms from hg

* add target marker functionality

* remove old variable on index

* [CodeFactor] Apply fixes

* a try on fixing tests

* [CodeFactor] Apply fixes

* fix CodeFactor issue

* improve tests with find and waiting time

* edit tags for tests

* remove parallel execution in js

* remove wait_for_ajax

* run route tests only local

* restore yarn.lock

* add newline to yarn.lock

* Code improvements

* [CodeFactor] Apply fixes

* Fix magic string

* possible fix for routing tests

* Parallelize ajax requests

Co-authored-by: Julian Schmidt

* reverse changes for parallel ajax

* add comment about race condition

* Paralize ajax requests WITH tests

* remove tests for routing (race condition)

Co-authored-by: Lukas Rost <[email protected]>
Co-authored-by: TheGrayStone <[email protected]>
Co-authored-by: Julian Schmidt <[email protected]>
Co-authored-by: codefactor-io <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request T.O.B.I.A.S. (TF1 & TF2)
Projects
None yet
Development

No branches or pull requests

1 participant