Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaitasaini committed Jul 30, 2024
1 parent 499e412 commit 29b45ce
Show file tree
Hide file tree
Showing 15 changed files with 6 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { render, screen } from "@testing-library/react";
import { axe } from "jest-axe";
// utils
import { RouterWrappedComponent } from "utils/testing/setupJest";
// components
import { Accordion } from "@chakra-ui/react";
import { AccordionItem } from "components";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { ReactChild } from "react";
// components
import {
AccordionButton,
AccordionItem as AccordionItemRoot,
AccordionPanel,
Image,
Text,
} from "@chakra-ui/react";
// assets
import plusIcon from "assets/icons/icon_plus.png";
import minusIcon from "assets/icons/icon_minus.png";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { render, screen } from "@testing-library/react";
import { axe } from "jest-axe";
import userEvent from "@testing-library/user-event";
// utils
import { RouterWrappedComponent } from "utils/testing/setupJest";
// components
import { FaqAccordion } from "components";

const accordionItems = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// components
import { Accordion, Box, Text } from "@chakra-ui/react";
import { AccordionItem } from "components";
// utils
import { AnyObject } from "types";

export const FaqAccordion = ({ accordionItems, ...props }: Props) => {
Expand Down
6 changes: 2 additions & 4 deletions services/ui-src/src/components/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useStore } from "utils";
import { useEffect } from "react";
import { useLocation, Routes, Route } from "react-router-dom";
import { Routes, Route } from "react-router-dom";
import {
AppRoutes,
Error,
Expand All @@ -18,7 +17,6 @@ export const App = () => {
const mqClasses = makeMediaQueryClasses();
// const context = useContext(UserContext);
const { user, showLocalLogins } = useStore();
const { pathname, key } = useLocation();
// const { pathname } = useLocation();

// TODO: fire tealium page view on route change
Expand All @@ -36,7 +34,7 @@ export const App = () => {
const authenticatedRoutes = (
<>
{user && (
<Flex sx={sx.appLayout}>
<Flex data-testid="app-container" sx={sx.appLayout}>
<Timeout />
<Container sx={sx.appContainer} data-testid="app-container">
<ErrorBoundary FallbackComponent={Error}>
Expand Down
1 change: 0 additions & 1 deletion services/ui-src/src/components/cards/Card.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { render, screen } from "@testing-library/react";
import { axe } from "jest-axe";
//components
import { Card } from "components";

const cardComponent = (
Expand Down
1 change: 0 additions & 1 deletion services/ui-src/src/components/cards/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ReactChild } from "react";
// components
import { Box } from "@chakra-ui/react";

export const Card = ({ children, ...props }: Props) => {
Expand Down
1 change: 0 additions & 1 deletion services/ui-src/src/components/cards/EmailCard.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { render, screen } from "@testing-library/react";
import { axe } from "jest-axe";
//components
import { EmailCard } from "components";
import { createEmailLink } from "utils/other/email";
import verbiage from "verbiage/pages/help";
Expand Down
7 changes: 2 additions & 5 deletions services/ui-src/src/components/cards/EmailCard.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
// components
import { Flex, Image, Link, Text } from "@chakra-ui/react";
import { Card } from "components";
// utils
import { useBreakpoint } from "utils";
import { AnyObject } from "types";
import { createEmailLink } from "utils/other/email";
// assets
import spreadsheetIcon from "assets/icons/icon_spreadsheet.png";
import settingsIcon from "assets/icons/icon_wrench_gear.png";

const iconMap: { [key: string]: { [key: string]: string } } = {
const iconMap = {
spreadsheet: {
image: spreadsheetIcon,
alt: "spreadsheet icon",
Expand Down Expand Up @@ -47,7 +44,7 @@ export const EmailCard = ({ verbiage, icon, cardprops, ...props }: Props) => {

interface Props {
verbiage: AnyObject;
icon: string;
icon: keyof typeof iconMap;
[key: string]: any;
}

Expand Down
4 changes: 2 additions & 2 deletions services/ui-src/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// accordions
export { AccordionItem } from "./accordians/AccordianItem";
export { FaqAccordion } from "./accordians/FaqAccordian";
export { AccordionItem } from "./accordions/AccordionItem";
export { FaqAccordion } from "./accordions/FaqAccordion";
// alerts
export { Alert } from "./alerts/Alert";
export { ErrorAlert } from "./alerts/ErrorAlert";
Expand Down
2 changes: 0 additions & 2 deletions services/ui-src/src/components/layout/Footer.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { render, screen } from "@testing-library/react";
import { axe } from "jest-axe";
// utils
import { RouterWrappedComponent } from "utils/testing/setupJest";
//components
import { Footer } from "components";

const footerComponent = (
Expand Down
3 changes: 0 additions & 3 deletions services/ui-src/src/components/layout/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { Link as RouterLink } from "react-router-dom";
// components
import { Box, Container, Flex, Image, Link, Text } from "@chakra-ui/react";
// utils
import { useBreakpoint } from "utils";
// assets
import hhsLogo from "assets/logos/logo_hhs.png";
import medicaidLogo from "assets/logos/logo_medicaid.svg";
import hcbsLogo from "assets/logos/logo_mdct_hcbs_footer.png";
Expand Down
3 changes: 0 additions & 3 deletions services/ui-src/src/components/layout/Timeout.test.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
import { act } from "react-dom/test-utils";
import { axe } from "jest-axe";
// components
import { Timeout } from "components";
// constants
import { IDLE_WINDOW, PROMPT_AT } from "../../constants";
// utils
import {
mockStateUserStore,
RouterWrappedComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { render, screen } from "@testing-library/react";
import { axe } from "jest-axe";
// components
import { HelpPage } from "components/pages/HelpPage/HelpPage";
// utils
import { RouterWrappedComponent } from "utils/testing/setupJest";
// verbiage
import verbiage from "verbiage/pages/help";

const helpView = (
Expand Down
1 change: 0 additions & 1 deletion services/ui-src/src/components/pages/HelpPage/HelpPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// components
import { Box, Heading, Text } from "@chakra-ui/react";
import { EmailCard, FaqAccordion, PageTemplate } from "components";
import verbiage from "verbiage/pages/help";
Expand Down

0 comments on commit 29b45ce

Please sign in to comment.