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

Nvt detailspage test #2660

Merged
merged 28 commits into from
Feb 2, 2021
Merged

Conversation

y0urself
Copy link
Member

@y0urself y0urself commented Jan 13, 2021

What:

  • Added tests for NVT Details Pages.
  • No permissions as NVTs are Global Objects
  • No Copy, Clone, Edit or Delete stuff for NVTs

While there:

  • Updating the DateTime format for Note and Override Boxes

Why:

  • Tests have been missing so far ....

How:

Checklist:

@codecov
Copy link

codecov bot commented Jan 14, 2021

Codecov Report

Merging #2660 (6aba2a7) into master (fd8dad7) will increase coverage by 0.28%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2660      +/-   ##
==========================================
+ Coverage   60.77%   61.06%   +0.28%     
==========================================
  Files        1113     1113              
  Lines       28081    28081              
  Branches     7993     8025      +32     
==========================================
+ Hits        17067    17148      +81     
+ Misses       9965     9894      -71     
+ Partials     1049     1039      -10     
Impacted Files Coverage Δ
gsa/src/web/entity/box.js 100.00% <ø> (ø)
gsa/src/web/pages/nvts/detailspage.js 94.00% <100.00%> (+72.00%) ⬆️
gsa/src/web/components/menu/usermenu.js 77.77% <0.00%> (-7.41%) ⬇️
gsa/src/web/utils/render.js 24.32% <0.00%> (+0.90%) ⬆️
gsa/src/web/components/icon/solutiontypeicon.js 100.00% <0.00%> (+3.12%) ⬆️
gsa/src/web/entity/override.js 93.33% <0.00%> (+6.66%) ⬆️
gsa/src/web/pages/nvts/preferences.js 80.00% <0.00%> (+40.00%) ⬆️
gsa/src/web/pages/nvts/references.js 60.00% <0.00%> (+50.00%) ⬆️
gsa/src/web/pages/nvts/solution.js 83.33% <0.00%> (+50.00%) ⬆️
gsa/src/web/pages/nvts/component.js 100.00% <0.00%> (+66.66%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd8dad7...6aba2a7. Read the comment docs.

@y0urself
Copy link
Member Author

Finally ...

@y0urself y0urself marked this pull request as ready for review January 14, 2021 15:21
@y0urself y0urself requested a review from a team January 14, 2021 15:21

import EntityBox from '../box';

setLocale('en');

const date = Date('2019-01-01T12:00:00Z');
const date2 = Date('2019-02-02T12:00:00Z');
const manualUrl = 'test/';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need the manualUrl here? I can't figure out where that would be used.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used in the help icon to direct to the manual. Normally it's set in GOS, but here we probably need it for testing to be test...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, I should have phrased my question better. This is the test for the entity box. Where do we use a help icon here? I can't find any manual links here and I don't think we need the manualUrl for anything else.

And as a note: for tests with a help icon (or rather with a manual link) the manualUrl needs to be set but it doesn't have to be 'test/' it just needs to be defined.

@y0urself y0urself requested a review from sarahd93 January 21, 2021 11:29
y0urself and others added 5 commits February 1, 2021 16:22
Co-authored-by: sarahd93 <sarah.diedrich93@gmail.com>
Co-authored-by: sarahd93 <sarah.diedrich93@gmail.com>
Co-authored-by: sarahd93 <sarah.diedrich93@gmail.com>
@y0urself y0urself requested a review from sarahd93 February 1, 2021 15:40
@sarahd93 sarahd93 merged commit ba3fef9 into greenbone:master Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants