From dba5846ee4e26f0b1ea2dea610b136fef1f33d62 Mon Sep 17 00:00:00 2001 From: Nishchit Dhanani Date: Mon, 14 Aug 2023 15:48:43 +0530 Subject: [PATCH] test: basic jest errors are resolved and store facade created --- .../components/activity-bar/ActionItem.tsx | 2 +- .../src/components/auth-panel/AuthPanel.tsx | 16 ++-- .../components/auth-panel/auths/Atlassion.tsx | 18 +++-- .../components/auth-panel/auths/OAuth1.tsx | 2 +- .../components/auth-panel/auths/OAuth2.tsx | 2 +- .../editors/cm-gql-editor/CMGQueryEditor.tsx | 4 +- .../quick-selection/QuickSelection.tsx | 2 +- .../firecamp-ui/src/components/tabs/Tab.tsx | 2 +- playgrounds/firecamp-graphql/package.json | 2 +- .../common/urlbar/UrlBarContainer.test.tsx | 81 +++++++++++++++++++ .../common/urlbar/useUrlBarFacade.ts | 23 ++++++ playgrounds/firecamp-graphql/tsconfig.json | 2 +- 12 files changed, 132 insertions(+), 24 deletions(-) create mode 100644 playgrounds/firecamp-graphql/src/components/common/urlbar/UrlBarContainer.test.tsx create mode 100644 playgrounds/firecamp-graphql/src/components/common/urlbar/useUrlBarFacade.ts diff --git a/platform/firecamp-ui/src/components/activity-bar/ActionItem.tsx b/platform/firecamp-ui/src/components/activity-bar/ActionItem.tsx index 589a9d02..e480c9c9 100644 --- a/platform/firecamp-ui/src/components/activity-bar/ActionItem.tsx +++ b/platform/firecamp-ui/src/components/activity-bar/ActionItem.tsx @@ -1,4 +1,4 @@ -import { useEffect, FC } from 'react'; +import { FC } from 'react'; import cx from 'classnames'; import { UserCircle2 } from 'lucide-react'; // import ReactTooltip from 'react-tooltip'; diff --git a/platform/firecamp-ui/src/components/auth-panel/AuthPanel.tsx b/platform/firecamp-ui/src/components/auth-panel/AuthPanel.tsx index d76de6cd..0578ea5f 100644 --- a/platform/firecamp-ui/src/components/auth-panel/AuthPanel.tsx +++ b/platform/firecamp-ui/src/components/auth-panel/AuthPanel.tsx @@ -1,7 +1,7 @@ import { FC, useState, useEffect } from 'react'; import _compact from 'lodash/compact'; import cx from 'classnames'; -import isEqual from 'react-fast-compare'; +// import isEqual from 'react-fast-compare'; import { VscTriangleDown } from '@react-icons/all-files/vsc/VscTriangleDown'; import { _misc, _object } from '@firecamp/utils'; import { @@ -30,7 +30,7 @@ import { Digest, // Hawk, Netrc, - Ntlm, + // Ntlm, OAuth1, OAuth2, NoAuth, @@ -42,11 +42,11 @@ const AuthPanel: FC = ({ value, activeAuthType = EAuthTypes.None, allowInherit = true, - onChangeAuthType = () => {}, - onChangeAuthValue = () => {}, - onChangeOAuth2Value = () => {}, - fetchTokenOnChangeOAuth2 = (authPayload: any) => {}, - fetchInheritedAuth = () => {}, + onChangeAuthType = () => { }, + onChangeAuthValue = () => { }, + onChangeOAuth2Value = () => { }, + fetchTokenOnChangeOAuth2 = (authPayload: any) => { }, + fetchInheritedAuth = () => { }, oauth2LastToken = '', }) => { const _authTypeList = allowInherit @@ -174,7 +174,7 @@ const AuthTypesDD: FC = ({ types, name, onSelect }) => { handler={() => (