Skip to content

Commit

Permalink
fix: linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-mng committed Nov 28, 2024
1 parent 1d5a453 commit c135d2c
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/web/components/form/__tests__/numberfield.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import {describe, test, expect, testing} from '@gsa/testing';

import {render, fireEvent, screen, userEvent} from 'web/utils/testing';
import {render, fireEvent, screen} from 'web/utils/testing';

import NumberField from '../numberfield';

Expand Down
1 change: 0 additions & 1 deletion src/web/components/form/__tests__/spinner.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {describe, test, expect, testing} from '@gsa/testing';
import {KeyCode} from 'gmp/utils/event';

import {render, fireEvent, screen, userEvent} from 'web/utils/testing';
import {changeInputValue} from 'web/components/testing';

import Spinner from '../spinner';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
getSelectItemElements,
clickElement,
getSelectElement,
changeSelectInput,
} from 'web/components/testing';

import RelationSelector from 'web/components/powerfilter/relationselector';
Expand Down
13 changes: 5 additions & 8 deletions src/web/components/testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import {PointerEventsCheckLevel} from '@testing-library/user-event';

import {isDefined} from 'gmp/utils/identity';
import {expect} from 'vitest';

import {
userEvent,
Expand Down Expand Up @@ -285,10 +286,8 @@ export const testBulkTrashcanDialog = (screen, dialogAction) => {
const dialog = screen.getByRole('dialog');
expect(dialog).toBeVisible();

const buttons = dialog.querySelectorAll('button');
expect(buttons[2]).toHaveTextContent('Move to Trashcan');

fireEvent.click(buttons[2]);
const moveToTrashcanButton = screen.getByText('Move to Trashcan');
fireEvent.click(moveToTrashcanButton);

expect(dialogAction).toHaveBeenCalled();
};
Expand All @@ -297,10 +296,8 @@ export const testBulkDeleteDialog = (screen, dialogAction) => {
const dialog = screen.getByRole('dialog');
expect(dialog).toBeVisible();

const buttons = dialog.querySelectorAll('button');
expect(buttons[2]).toHaveTextContent('Delete');

fireEvent.click(buttons[2]);
const deleteButton = screen.getByText('Delete');
fireEvent.click(deleteButton);

expect(dialogAction).toHaveBeenCalled();
};
2 changes: 1 addition & 1 deletion src/web/pages/extras/cvssV4/__tests__/metrics.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import {describe, test, expect, testing} from '@gsa/testing';
import {getAllByTestId, render} from 'web/utils/testing';
import {render} from 'web/utils/testing';
import Metrics from 'web/pages/extras/cvssV4/Metrics';

describe('Metrics', () => {
Expand Down
1 change: 0 additions & 1 deletion src/web/pages/overrides/dialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ import Select from 'web/components/form/select';
import Row from 'web/components/layout/row';

import useTranslation from 'web/hooks/useTranslation';
import Layout from 'web/components/layout/layout';

const OverrideDialog = ({
active = ACTIVE_YES_ALWAYS_VALUE,
Expand Down
2 changes: 1 addition & 1 deletion src/web/pages/tasks/icons/__tests__/stopicon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Capabilities from 'gmp/capabilities/capabilities';
import Audit, {AUDIT_STATUS} from 'gmp/models/audit';
import Task, {TASK_STATUS} from 'gmp/models/task';

import {rendererWith, fireEvent, queryByTestId} from 'web/utils/testing';
import {rendererWith, fireEvent} from 'web/utils/testing';

import Theme from 'web/utils/theme';

Expand Down

0 comments on commit c135d2c

Please sign in to comment.