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
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1ddc6a2
First test for nvt details pages ... pweh ...
y0urself Jan 13, 2021
237b954
Tabs tests for NVT detailspage
y0urself Jan 13, 2021
b340f3b
Merge branch 'master' of https://github.com/greenbone/gsa into nvt-de…
y0urself Jan 13, 2021
3ec0ff2
Adding Note and Overrides to the detailspage test
y0urself Jan 14, 2021
0bcbee5
Export ToolBarIcons
y0urself Jan 14, 2021
534b369
Add toolbaricons tests
y0urself Jan 14, 2021
a1a0099
Last tests
y0urself Jan 14, 2021
9a6ad28
Linting
y0urself Jan 14, 2021
d8dccde
Dealing with the Date-Time test issues again ...
y0urself Jan 14, 2021
ba6e91c
Dealing with the Date-Time test issues again ...
y0urself Jan 14, 2021
c1b3000
Dealing with the Date-Time test issues again ...
y0urself Jan 14, 2021
49baf19
Updating the old Date format to DateTime tags
y0urself Jan 14, 2021
b54d0ae
Linting
y0urself Jan 14, 2021
9c4fdf9
Fixing the datetime issues in the detailspage tests
y0urself Jan 14, 2021
744e247
Fixing the box tests with the new DateTime Container
y0urself Jan 14, 2021
ecc7531
Fixing the Note and OVerride Box tests
y0urself Jan 14, 2021
0c7075b
Update Copyright year
y0urself Jan 14, 2021
d26b64c
Merge branch 'master' of https://github.com/greenbone/gsa into nvt-de…
y0urself Jan 14, 2021
fa16771
Added suggestions and removed unused code
y0urself Jan 19, 2021
9514482
Merge branch 'master' of https://github.com/greenbone/gsa into nvt-de…
y0urself Jan 19, 2021
ea20f1b
Merge branch 'master' into nvt-detailspage-test
y0urself Jan 21, 2021
d6e7c7e
Linting
y0urself Jan 21, 2021
0dc4cf0
Fix test
y0urself Jan 21, 2021
9c5ee2f
Add suggested changes
y0urself Feb 1, 2021
bed109a
Merge branch 'master' of github.com:greenbone/gsa into nvt-detailspag…
y0urself Feb 1, 2021
ab7f4dd
Update gsa/src/web/entity/__tests__/box.js
y0urself Feb 1, 2021
5cd8b09
Update gsa/src/web/entity/__tests__/note.js
y0urself Feb 1, 2021
6aba2a7
Update gsa/src/web/entity/__tests__/override.js
y0urself Feb 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 1 addition & 26 deletions gsa/src/web/pages/nvts/__tests__/detailspage.js
Original file line number Diff line number Diff line change
@@ -92,7 +92,6 @@ const note1 = Note.fromElement({
_id: '5221d57f-3e62-4114-8e19-135a79b6b102',
active: 1,
creation_time: '2021-01-14T06:35:57Z',
end_time: '',
hosts: '127.0.01.1',
in_use: 0,
end_time: '2021-02-13T07:35:20+01:00',
@@ -132,7 +131,6 @@ const override1 = Override.fromElement({
_id: '5221d57f-3e62-4114-8e19-000000000001',
active: 1,
creation_time: '2021-01-14T05:35:57Z',
end_time: '',
hosts: '127.0.01.1',
in_use: 0,
end_time: '2021-03-13T11:35:20+01:00',
@@ -172,7 +170,6 @@ const override2 = Override.fromElement({
_id: '5221d57f-3e62-4114-8e19-000000000000',
active: 1,
creation_time: '2020-01-14T06:35:57Z',
end_time: '',
hosts: '127.0.01.1',
in_use: 0,
end_time: '2021-02-13T12:35:20+01:00',
@@ -208,27 +205,6 @@ const override2 = Override.fromElement({
writable: 1,
});

const filter = Filter.fromElement({
filter_type: '',
terms: [
{
keyword: 'nvt_id',
relation: '=',
value: '12345',
},
{
keyword: 'first',
relation: '=',
value: 1,
},
{
keyword: 'rows',
relation: '=',
value: -1,
},
],
});

const getNvt = jest.fn().mockResolvedValue({
data: nvt,
});
@@ -319,7 +295,6 @@ describe('Nvt Detailspage tests', () => {
expect(element).toHaveTextContent('Owner:(Global Object)');

const tabs = screen.getAllByTestId('entities-tab-title');
//expect(tabs[0]).toHaveTextContent('Information');
expect(tabs[0]).toHaveTextContent('Preferences');
expect(tabs[1]).toHaveTextContent('User Tags');

@@ -522,7 +497,7 @@ describe('Nvt ToolBarIcons tests', () => {
router: true,
});

const {element} = render(
render(
<ToolBarIcons
entity={nvt}
onNoteCreateClick={handleOnNoteCreateClick}