Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_modules
*.log
.idea/
package.json.lock
.codegraph
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
"css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^4.2.2",
"dropzone": "5.7.2",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"extend": "^3.0.1",
"file-loader": "^6.2.0",
"final-form": "^4.20.7",
Expand Down Expand Up @@ -70,13 +68,13 @@
"node-sass": "^7.0.1",
"path": "^0.12.7",
"postcss-loader": "^6.2.1",
"react": "^16.13.1",
"react": "^17.0.0",
"react-beautiful-dnd": "^13.1.1",
"react-bootstrap": "^0.31.5",
"react-datetime": "^2.16.2",
"react-dnd": "^16.0.0",
"react-dnd-html5-backend": "^16.0.0",
"react-dom": "^16.13.1",
"react-dom": "^17.0.0",
"react-dropzone": "^4.2.9",
"react-final-form": "^6.5.9",
"react-google-maps": "^9.4.5",
Expand Down Expand Up @@ -133,13 +131,13 @@
"lodash": "^4.17.14",
"moment": "^2.22.2",
"moment-timezone": "^0.5.21",
"react": "^16.13.1",
"react": "^17.0.0",
"react-beautiful-dnd": "^13.1.1",
"react-bootstrap": "^0.31.5",
"react-datetime": "^2.16.2",
"react-dnd": "^16.0.0",
"react-dnd-html5-backend": "^16.0.0",
"react-dom": "^16.13.1",
"react-dom": "^17.0.0",
"react-dropzone": "^4.2.9",
"react-final-form": "^6.5.9",
"react-google-maps": "^9.4.5",
Expand Down Expand Up @@ -192,5 +190,6 @@
"console": {}
},
"testEnvironment": "jsdom"
}
},
"dependencies": {}
}
19 changes: 9 additions & 10 deletions src/components/mui/__tests__/mui-formik-upload.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@
* limitations under the License.
* */

jest.mock("../../inputs/upload-input-v2", () => ({
UploadInputV2: ({ value, canAdd }) => {
const React = require("react");
return (
<div data-testid="upload-input" data-can-add={canAdd}>
{value.length} file(s)
</div>
);
}
}));
jest.mock("../../inputs/upload-input-v2", () => {
const React = require("react");
const MockUploadInputV2 = ({ value, canAdd }) => (
<div data-testid="upload-input" data-can-add={canAdd}>
{value.length} file(s)
</div>
);
return { __esModule: true, default: MockUploadInputV2 };
});

import React from "react";
import { render, screen } from "@testing-library/react";
Expand Down
2 changes: 1 addition & 1 deletion src/components/mui/formik-inputs/mui-formik-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import React from "react";
import PropTypes from "prop-types";
import { FormHelperText } from "@mui/material";
import { UploadInputV2 } from "../../inputs/upload-input-v2";
import UploadInputV2 from "../../inputs/upload-input-v2";
import { useField } from "formik";
import {
ALLOWED_INVENTORY_IMAGE_FORMATS,
Expand Down
3 changes: 1 addition & 2 deletions src/components/schedule-builder-view/schedule-event-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import moment from 'moment-timezone'
import {useDrop} from 'react-dnd'
import {DraggableItemTypes} from './constants';
import ScheduleEvent from './schedule-event';
import ReactDOM from 'react-dom';
import SummitEvent from '../../models/summit-event';

const TimeSlot = ({timeLabel, id}) => {
Expand Down Expand Up @@ -165,7 +164,7 @@ const ScheduleEventList = (props) => {
}

const getBoundingBox = () => {
return ReactDOM.findDOMNode(scheduleEventContainer.current).getBoundingClientRect();
return scheduleEventContainer.current.getBoundingClientRect();
}

const calculateInitialTop = (event) => {
Expand Down
2 changes: 2 additions & 0 deletions src/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ export const RATE_FIELDS = {
STANDARD: "standard_rate",
ONSITE: "onsite_rate"
};

export const DECIMAL_DIGITS = 2;
Loading
Loading