Skip to content

Commit

Permalink
style: reformat code after import change
Browse files Browse the repository at this point in the history
  • Loading branch information
paulschreiber committed Apr 29, 2024
1 parent 7c7081d commit 7c53985
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 39 deletions.
3 changes: 1 addition & 2 deletions src/account/components/AccountProfile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, within } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import { when } from 'jest-when';
import _ from 'lodash/fp';
import { act } from 'react';
import { useNavigate, useParams, useSearchParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
3 changes: 1 addition & 2 deletions src/contact/ContactForm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { render, screen } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import _ from 'lodash/fp';
import { act } from 'react';

import { useScript } from 'custom-hooks';

Expand Down
3 changes: 1 addition & 2 deletions src/group/components/GroupForm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, within } from 'tests/utils';
import React from 'react';
import { act } from 'react';
import React, { act } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
3 changes: 1 addition & 2 deletions src/group/components/GroupList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, within } from 'tests/utils';
import React from 'react';
import { act } from 'react';
import React, { act } from 'react';
import { useSearchParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';
import useMediaQuery from '@mui/material/useMediaQuery';
Expand Down
3 changes: 1 addition & 2 deletions src/group/membership/components/GroupMembers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import _ from 'lodash/fp';
import { act } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';
import { GROUP_TYPES_WITH_REDIRECTS } from 'tests/constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, within } from 'tests/utils';
import React from 'react';
import { act } from 'react';
import React, { act } from 'react';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import { act } from 'react';
import React, { act } from 'react';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import MapboxDraw from '@mapbox/mapbox-gl-draw';
import { act } from 'react';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import MapboxDraw from '@mapbox/mapbox-gl-draw';
import { act } from 'react';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen } from 'tests/utils';
import React from 'react';
import { act } from 'react';
import React, { act } from 'react';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
3 changes: 1 addition & 2 deletions src/landscape/components/LandscapeForm/KeyInfoNew.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import { act } from 'react';
import React, { act } from 'react';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
3 changes: 1 addition & 2 deletions src/landscape/components/LandscapeForm/KeyInfoUpdate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, within } from 'tests/utils';
import React from 'react';
import { act } from 'react';
import React, { act } from 'react';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import AvatarEditor from 'react-avatar-editor';
import { act } from 'react';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
3 changes: 1 addition & 2 deletions src/landscape/components/LandscapeForm/ProfileUpdate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import { act } from 'react';
import React, { act } from 'react';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
3 changes: 1 addition & 2 deletions src/landscape/components/LandscapeList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import { act } from 'react';
import React, { act } from 'react';
import { useSearchParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';
import { mockTerrasoAPIrequestGraphQL } from 'tests/apiUtils';
Expand Down
3 changes: 1 addition & 2 deletions src/landscape/membership/components/LandscapeMembers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import _ from 'lodash/fp';
import { act } from 'react';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';
import { mockTerrasoAPIrequestGraphQL } from 'tests/apiUtils';
import useMediaQuery from '@mui/material/useMediaQuery';
Expand Down
3 changes: 1 addition & 2 deletions src/layout/AppBar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import Cookies from 'js-cookie';
import { act } from 'react';
import { useLocation, useNavigate } from 'react-router-dom';
import useMediaQuery from '@mui/material/useMediaQuery';

Expand Down
3 changes: 1 addition & 2 deletions src/localization/components/LocalePicker.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, within } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import _ from 'lodash/fp';
import { act } from 'react';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';
import useMediaQuery from '@mui/material/useMediaQuery';

Expand Down
3 changes: 1 addition & 2 deletions src/navigation/components/Navigation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen } from 'tests/utils';
import React from 'react';
import { act } from 'react';
import React, { act } from 'react';
import { useLocation } from 'react-router-dom';

import Navigation from 'navigation/components/Navigation';
Expand Down
2 changes: 1 addition & 1 deletion src/tests/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ import React from 'react';
// import for side effects to ensure config happens before running tests
import 'config';

import { act } from 'react';
import {
waitFor as baseWaitFor,
cleanup,
render as rtlRender,
} from '@testing-library/react';
import { axe, toHaveNoViolations } from 'jest-axe';
import { act } from 'react';
import createStore from 'terrasoApi/store';

import AppWrappers from 'layout/AppWrappers';
Expand Down

0 comments on commit 7c53985

Please sign in to comment.