mirror of
https://github.com/UniversityOfHelsinkiCS/ohtuilmo.git
synced 2026-10-12 19:03:41 +03:00
Merge pull request #178 from Ohtuilmo/fix/revert-app-try-catch-block
Revert App.js try-catch block as it was breaking tests
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
"build": "react-scripts build",
|
||||
"eject": "react-scripts eject",
|
||||
"test": "CYPRESS_baseUrl=http://localhost:3000 npm run cypress:open",
|
||||
"test:headless": "CYPRESS_baseUrl=http://localhost:3000 npm run cypress:run",
|
||||
"lint": "eslint src/",
|
||||
"e2e:install": "./e2e/run_cypress_e2e.sh install",
|
||||
"e2e:setup": "./e2e/run_cypress_e2e.sh setup",
|
||||
|
||||
+3
-10
@@ -80,11 +80,7 @@ const App = (props) => {
|
||||
useEffect(() => {
|
||||
const handleLogin = async () => {
|
||||
if (!window.location.href.includes('customer-review/')) {
|
||||
try {
|
||||
await loginUser()
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
await loginUser()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,13 +93,10 @@ const App = (props) => {
|
||||
}
|
||||
|
||||
fetchData()
|
||||
|
||||
const loginInterval = setInterval(() => {
|
||||
if (!window.location.href.includes('customer-review/')) {
|
||||
try {
|
||||
loginService.login()
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
loginService.login()
|
||||
}
|
||||
}, 60 * 1000)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user