Skip to content

Commit

Permalink
fix: failing tests and library updates
Browse files Browse the repository at this point in the history
  • Loading branch information
asartalo committed Sep 30, 2022
1 parent 8ef96f8 commit c668010
Show file tree
Hide file tree
Showing 14 changed files with 30,381 additions and 21,640 deletions.
51,905 changes: 30,326 additions & 21,579 deletions package-lock.json

Large diffs are not rendered by default.

78 changes: 39 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,52 @@
"version": "0.0.75",
"private": true,
"dependencies": {
"@commitlint/cli": "^16.1.0",
"@commitlint/config-conventional": "^16.0.0",
"@material-ui/core": "^4.11.4",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.58",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.0.0",
"@testing-library/user-event": "^13.5.0",
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@material-ui/lab": "^4.0.0-alpha.61",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^12.1.5",
"@testing-library/user-event": "^14.4.3",
"@types/classnames": "^2.3.1",
"@types/jest": "^27.4.0",
"@types/jest": "^29.1.0",
"@types/jspdf": "^2.0.0",
"@types/node": "^17.0.15",
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11",
"@types/node": "^17.0.45",
"@types/react": "^17.0.50",
"@types/react-dom": "^17.0.17",
"@types/react-router-dom": "^5.3.3",
"@types/standard-version": "^7.0.1",
"@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2",
"better-react-mathjax": "^1.0.3",
"canvas": "^2.8.0",
"classnames": "^2.3.1",
"eslint": "^8.8.0",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@typescript-eslint/parser": "^5.38.1",
"better-react-mathjax": "^2.0.2",
"canvas": "^2.10.1",
"classnames": "^2.3.2",
"eslint": "^8.24.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^16.1.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-react-app": "^7.0.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jest": "^26.0.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-sonarjs": "^0.13.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^27.0.4",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-promise": "^6.0.1",
"eslint-plugin-react": "^7.31.8",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-sonarjs": "^0.15.0",
"eslint-plugin-testing-library": "^5.0.5",
"html2pdf.js": "^0.10.1",
"husky": "^7.0.0",
"husky": "^8.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^6.2.1",
"react-scripts": "^5.0.0",
"standard-version": "^9.3.0",
"ts-node": "^10.0.0",
"typescript": "^4.3.5",
"uuid": "^8.3.2",
"web-vitals": "^2.1.4",
"react-router-dom": "^6.4.1",
"react-scripts": "^5.0.1",
"standard-version": "^9.5.0",
"ts-node": "^10.9.1",
"typescript": "^4.8.4",
"uuid": "^9.0.0",
"web-vitals": "^3.0.2",
"workbox-background-sync": "^6.4.2",
"workbox-broadcast-update": "^6.4.2",
"workbox-cacheable-response": "^6.4.2",
Expand All @@ -66,13 +66,13 @@
"@cypress/code-coverage": "^3.10.0",
"@cypress/instrument-cra": "^1.4.0",
"@testing-library/cypress": "^8.0.3",
"@types/inquirer": "^8.2.1",
"@types/inquirer": "^9.0.2",
"@types/shelljs": "^0.8.11",
"chalk": "^4.1.2",
"chalk": "^5.0.1",
"coveralls": "^3.1.1",
"cypress": "^10.1.0",
"cypress-hmr-restarter": "^2.0.2",
"inquirer": "^8.2.2",
"cypress": "^10.9.0",
"cypress-hmr-restarter": "^2.0.4",
"inquirer": "^9.1.2",
"istanbul-merge": "^1.1.1",
"quote-it": "^1.0.1",
"shelljs": "^0.8.5"
Expand Down
8 changes: 2 additions & 6 deletions src/components/PaperPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { ReactNode } from 'react';
import { makeStyles, Paper } from '@material-ui/core';
import { CSSProperties } from '@material-ui/core/styles/withStyles';
import classNames from 'classnames';
import { usePaperOptions } from './PaperOptionsProvider';

Expand Down Expand Up @@ -67,15 +66,12 @@ function PaperPage({
margin, orientation, scale, paperSize,
} = options;
const classes = paperPageStyles();
const paperStyle: CSSProperties = {
const paperStyle = {
aspectRatio: paperSize.aspectRatioStr(orientation),
width: paperSize.orientationWidth(orientation),
transform: scale !== 1 ? `scale(${scale})` : undefined,
};

if (scale !== 1) {
paperStyle.transform = `scale(${scale})`;
}

const dimensionStyles = paperSize.dimensionsStr(orientation);

return (
Expand Down
4 changes: 2 additions & 2 deletions src/customTypings/mui-material-styles.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DefaultTheme as DefaultMuiTheme } from '@material-ui/core/node_modules/@material-ui/styles';
import { DefaultTheme as DefaultMuiTheme } from '@material-ui/core';
import { Theme } from '@material-ui/core/styles/createTheme';

declare module '@material-ui/core/node_modules/@material-ui/styles' {
declare module '@material-ui/core' {
interface DefaultTheme extends DefaultMuiTheme, Theme {
}
}
2 changes: 1 addition & 1 deletion src/elements/MajorPageTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ReactNode } from 'react';
import { makeStyles } from '@material-ui/core/node_modules/@material-ui/styles';
import { makeStyles } from '@material-ui/core';
import PageTitle from './PageTitle';

const styles = makeStyles(() => ({
Expand Down
3 changes: 1 addition & 2 deletions src/elements/SectionPageTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { ElementType, ReactNode } from 'react';
import { makeStyles } from '@material-ui/core/node_modules/@material-ui/styles';
import { makeStyles, Grid } from '@material-ui/core';
import Typography from '@material-ui/core/Typography';
import { Variant } from '@material-ui/core/styles/createTypography';
import { Grid } from '@material-ui/core';

const styles = makeStyles(() => ({
margins: {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/LocalStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface CreateLocalStoreProps<T, K = T> {
toJSON?: ToJSON<T, K> | undefined;
}

interface LocalStoreProps<T, K = T> extends CreateLocalStoreProps<T, K>{
interface LocalStoreProps<T, K = T> extends CreateLocalStoreProps<T, K> {
storage: Storage,
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/additionFillTheBlanks/CustomizeAftbForm.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe('CustomizeAftbForm', () => {
describe('when the problem generation is set to custom addends', () => {
beforeEach(() => {
const field = screen.getByLabelText(/problem generation/i);
userEvent.selectOptions(field, 'Custom Addends');
return userEvent.selectOptions(field, 'Custom Addends');
});

it('hides number range slider', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/pages/calendar/CustomizeCalendarForm.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ describe('CustomizeCalendarForm', () => {
});

describe('when the values are changed', () => {
beforeEach(() => {
userEvent.selectOptions(screen.getByLabelText('Year'), '2031');
userEvent.selectOptions(screen.getByLabelText('Month'), 'February');
beforeEach(async () => {
await userEvent.selectOptions(screen.getByLabelText('Year'), '2031');
await userEvent.selectOptions(screen.getByLabelText('Month'), 'February');
});

it('sends calendar data to onChange callback', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/patterns/PreviewPatterns.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable react/no-array-index-key */
import { makeStyles } from '@material-ui/core/node_modules/@material-ui/styles';
import { makeStyles } from '@material-ui/core';
import classNames from 'classnames';
import React from 'react';
import FontLoad from '../../components/FontLoad';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/placeValues/MultipleChoiceProblem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { makeStyles } from '@material-ui/core/node_modules/@material-ui/styles';
import { makeStyles } from '@material-ui/core';
import React, { ReactNode } from 'react';
import formatNumber from '../../lib/formatNumber';
import uniqueElements from '../../lib/uniqueElements';
Expand Down
3 changes: 1 addition & 2 deletions src/pages/settings/SettingsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { Box } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/node_modules/@material-ui/styles';
import { Box, makeStyles } from '@material-ui/core';
import SettingsForm from './SettingsForm';
import MajorPageTitle from '../../elements/MajorPageTitle';
import useSettings from '../useSettings';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/subtractionWithFigures/SubtractionFigure.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { makeStyles } from '@material-ui/core/node_modules/@material-ui/styles';
import { makeStyles } from '@material-ui/core';
import classNames from 'classnames';
import React from 'react';
import Subtraction from '../../lib/math/Subtraction';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/verticalAddition/VerticalAdditionItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { makeStyles } from '@material-ui/core/node_modules/@material-ui/styles';
import { makeStyles } from '@material-ui/core';
import classNames from 'classnames';
import ProblemListItem from '../../components/ProblemListItem';
import Addition from '../../lib/math/Addition';
Expand Down

0 comments on commit c668010

Please sign in to comment.