fix issue with vite migration (#217)

* hotfix: 1.8.2 issues vite migration
* fix: file import options
This commit is contained in:
Carlos Valente
2022-10-13 15:04:13 +02:00
committed by GitHub
parent 723b1cfa48
commit 320834beab
7 changed files with 1295 additions and 1573 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ontime-ui",
"version": "1.8.2",
"version": "1.8.3",
"private": true,
"dependencies": {
"@chakra-ui/react": "^2.3.2",
@@ -36,7 +36,7 @@ class ErrorBoundary extends React.Component {
render() {
if (this.state.errorMessage) {
return (
<div className={style.errorContainer}>
<div className={style.errorContainer} data-testid="error-container">
<div>
<p className={style.error}>:/</p>
<p>Something went wrong</p>
@@ -1,15 +1,13 @@
import { memo, useEffect, useState } from 'react';
import isEqual from 'react-fast-compare';
import { useSearchParams } from 'react-router-dom';
import { overrideStylesURL } from 'common/api/apiConstants';
import { useRuntimeStylesheet } from 'common/hooks/useRuntimeStylesheet';
import PropTypes from 'prop-types';
import { overrideStylesURL } from '../../../common/api/apiConstants';
import { useRuntimeStylesheet } from '../../../common/hooks/useRuntimeStylesheet';
import LowerClean from './LowerClean';
import LowerLines from './LowerLines';
const isEqual = require('react-fast-compare');
const areEqual = (prevProps, nextProps) => {
return isEqual(prevProps.title, nextProps.title) && isEqual(prevProps.lower, nextProps.lower);
};
@@ -53,6 +53,11 @@ describe('validate routes', () => {
cy.contains('Info');
});
it('renders lower third with no errors', () => {
cy.visit('http://localhost:4001/lower');
cy.get('[data-testid="error-container"]').should('not.exist');
});
it('renders studio clock', () => {
cy.visit('http://localhost:4001/studio');
cy.contains('ON AIR');
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ontime",
"version": "1.8.2",
"version": "1.8.3",
"author": "Carlos Valente",
"description": "Time keeping for live events",
"repository": "https://github.com/cpvalente/ontime",
+2 -1
View File
@@ -48,7 +48,8 @@ const uploadAndParse = async (file, req, res, options) => {
} else if (result.message === 'success') {
// explicitly write objects
if (typeof result !== 'undefined') {
if (!options.onlyEvents) {
const uploadAll = options?.onlyEvents === 'false';
if (uploadAll) {
const mergedData = DataProvider.safeMerge(data, result.data);
data.event = mergedData.event;
data.settings = mergedData.settings;
+1282 -1564
View File
File diff suppressed because it is too large Load Diff