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

Tests are failing #9

Closed
bilalshaikh42 opened this issue Sep 26, 2019 · 6 comments
Closed

Tests are failing #9

bilalshaikh42 opened this issue Sep 26, 2019 · 6 comments
Assignees
Labels
bug Something isn't working
Projects

Comments

@bilalshaikh42
Copy link
Member

bilalshaikh42 commented Sep 26, 2019

Need to write tests for each component

@bilalshaikh42 bilalshaikh42 added the bug Something isn't working label Sep 26, 2019
@bilalshaikh42 bilalshaikh42 self-assigned this Sep 26, 2019
@bilalshaikh42 bilalshaikh42 added this to High priority in Bugs Oct 2, 2019
@bilalshaikh42
Copy link
Member Author

@gmarupilla Could you work on this as well? We need to get every test passing atleast for the unit tests. As we add more components it will get harder to manage so we should get this done before any further work

@gmarupilla
Copy link
Contributor

Yeah! Sure.

@gmarupilla
Copy link
Contributor

I looked into it. The problem with writing tests right now is that the requirement is not very concrete as of now. If i write tests right now, they'll have to be changed again once we start developing according to OAS file. What do you think?

@bilalshaikh42
Copy link
Member Author

We should definitely have the tests set up even though the spec is not finalized.

Firstly for unit tests, the majority of the test cases will not be dependent on the structure of objects but tests more basic features like ensuring that a list is properly populated or that the links and routing work. The ones that do rely on the objects Should fail if the spec changes so that we know that the front end needs updating.

Secondly, the e2e integration tests should not be dependent on the spec at all, but instead ensure that the site is working, regardless of what the api is sending out. Is a spec change breaks the e2e tests then that is a sign that the site needs to be adapted to the new spec, not that the tests must be changed.

@bilalshaikh42 bilalshaikh42 pinned this issue Oct 9, 2019
@gmarupilla gmarupilla unpinned this issue Oct 9, 2019
This was referenced Oct 15, 2019
@bilalshaikh42
Copy link
Member Author

@gmarupilla
All the tests have been fixed except for 2, the vega-viewer component and the file-edit component.
Both are giving an error about a parameter being null. For both components, the parameter is set using an HTTP Request.
We need to follow the below directions to mock the HTTPS request and give back a test parameter for the components to render.

https://blog.angulartraining.com/how-to-write-unit-tests-for-angular-code-that-uses-the-httpclient-429fa782eb15

@bilalshaikh42
Copy link
Member Author

fixed partially by #35
New issues opened for individual tests failing

Bugs automation moved this from High priority to Closed Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Bugs
  
Closed
Development

No branches or pull requests

2 participants