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:
Mikko Ahro
2024-03-11 15:08:58 +02:00
committed by GitHub
2 changed files with 4 additions and 10 deletions
+1
View File
@@ -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
View File
@@ -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)