This repository has been archived by the owner on Dec 7, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fixes issue where user is unable to navigate to new project scre…
…en (#629) Resolves the issue where user is unable to navigate to new project screen from the homepage. This also addresses other strange behavior related to routing in the app. -User being navigated to the homepage after creating a connection -Refresh application button not working Resolves AB#17258, 17263, 17058
- Loading branch information
Showing
9 changed files
with
93 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# react-scripts build use this to generate the right path for assets | ||
# react-scripts build use this to generate the right path for assets | ||
# relative to index.html | ||
# without it, you'll see error like this | ||
# Failed to load resource: net::ERR_FILE_NOT_FOUND /favicon.ico:1 | ||
PUBLIC_URL=. | ||
# Failed to load resource: net::ERR_FILE_NOT_FOUND /favicon.ico:1 | ||
PUBLIC_URL=. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,32 @@ | ||
const path = require("path"); | ||
|
||
module.exports = { | ||
target: "electron-main", | ||
entry: "./src/electron/main.ts", | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.ts?$/, | ||
use: [{ | ||
loader: "ts-loader", | ||
options: { | ||
compilerOptions: { | ||
noEmit: false | ||
node: { | ||
__dirname: false, | ||
}, | ||
target: "electron-main", | ||
entry: "./src/electron/main.ts", | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.ts?$/, | ||
use: [{ | ||
loader: "ts-loader", | ||
options: { | ||
compilerOptions: { | ||
noEmit: false | ||
} | ||
} | ||
}], | ||
exclude: /node_modules/ | ||
} | ||
} | ||
}], | ||
exclude: /node_modules/ | ||
} | ||
] | ||
}, | ||
resolve: { | ||
extensions: [".ts", ".js"] | ||
}, | ||
output: { | ||
filename: "main.js", | ||
path: path.resolve(__dirname, "../build") | ||
} | ||
}; | ||
] | ||
}, | ||
resolve: { | ||
extensions: [".ts", ".js"] | ||
}, | ||
output: { | ||
filename: "main.js", | ||
path: path.resolve(__dirname, "../build") | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,34 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
import App from "./App"; | ||
import { Provider } from "react-redux"; | ||
import createReduxStore from "./redux/store/store"; | ||
import initialState from "./redux/store/initialState"; | ||
import { IApplicationState } from "./models//applicationState"; | ||
import { mount } from "enzyme"; | ||
import { HashRouter } from "react-router-dom"; | ||
import { KeyboardManager } from "./react/components/common/keyboardManager/keyboardManager"; | ||
import { ErrorHandler } from "./react/components/common/errorHandler/errorHandler"; | ||
|
||
it("renders without crashing", () => { | ||
describe("App Component", () => { | ||
const defaultState: IApplicationState = initialState; | ||
const store = createReduxStore(defaultState); | ||
const div = document.createElement("div"); | ||
|
||
ReactDOM.render( | ||
<Provider store={store}> | ||
<App /> | ||
</Provider>, div); | ||
ReactDOM.unmountComponentAtNode(div); | ||
function createComponent() { | ||
return mount( | ||
<Provider store={store}> | ||
<App /> | ||
</Provider>, | ||
); | ||
} | ||
|
||
it("renders without crashing", () => { | ||
createComponent(); | ||
}); | ||
|
||
it("renders required top level components", () => { | ||
const wrapper = createComponent(); | ||
expect(wrapper.find(HashRouter).exists()).toBe(true); | ||
expect(wrapper.find(KeyboardManager).exists()).toEqual(true); | ||
expect(wrapper.find(ErrorHandler).exists()).toEqual(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters