Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
actual-vt-capstone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danieljk
actual-vt-capstone
Commits
c497d3a9
Unverified
Commit
c497d3a9
authored
5 months ago
by
Matiss Janis Aboltins
Committed by
GitHub
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
improve onboarding e2e test stability (#3503)
parent
fe17c6ba
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/desktop-client/src/components/FinancesApp.tsx
+22
-14
22 additions, 14 deletions
packages/desktop-client/src/components/FinancesApp.tsx
upcoming-release-notes/3503.md
+6
-0
6 additions, 0 deletions
upcoming-release-notes/3503.md
with
28 additions
and
14 deletions
packages/desktop-client/src/components/FinancesApp.tsx
+
22
−
14
View file @
c497d3a9
...
...
@@ -31,6 +31,7 @@ import { TransactionEdit } from './mobile/transactions/TransactionEdit';
import
{
Notifications
}
from
'
./Notifications
'
;
import
{
ManagePayeesPage
}
from
'
./payees/ManagePayeesPage
'
;
import
{
Reports
}
from
'
./reports
'
;
import
{
LoadingIndicator
}
from
'
./reports/LoadingIndicator
'
;
import
{
NarrowAlternate
,
WideComponent
}
from
'
./responsive
'
;
import
{
Settings
}
from
'
./settings
'
;
import
{
FloatableSidebar
}
from
'
./sidebar
'
;
...
...
@@ -65,19 +66,6 @@ function WideNotSupported({ children, redirectTo = '/budget' }) {
}
function
RouterBehaviors
()
{
const
navigate
=
useNavigate
();
const
accounts
=
useAccounts
();
const
accountsLoaded
=
useSelector
(
(
state
:
State
)
=>
state
.
queries
.
accountsLoaded
,
);
useEffect
(()
=>
{
// If there are no accounts, we want to redirect the user to
// the All Accounts screen which will prompt them to add an account
if
(
accountsLoaded
&&
accounts
.
length
===
0
)
{
navigate
(
'
/accounts
'
);
}
},
[
accountsLoaded
,
accounts
]);
const
location
=
useLocation
();
const
href
=
useHref
(
location
);
useEffect
(()
=>
{
...
...
@@ -91,6 +79,11 @@ export function FinancesApp() {
const
dispatch
=
useDispatch
();
const
{
t
}
=
useTranslation
();
const
accounts
=
useAccounts
();
const
accountsLoaded
=
useSelector
(
(
state
:
State
)
=>
state
.
queries
.
accountsLoaded
,
);
const
[
lastUsedVersion
,
setLastUsedVersion
]
=
useLocalPref
(
'
flags.updateNotificationShownForVersion
'
,
);
...
...
@@ -180,7 +173,22 @@ export function FinancesApp() {
<
BankSyncStatus
/>
<
Routes
>
<
Route
path
=
"/"
element
=
{
<
Navigate
to
=
"/budget"
replace
/>
}
/>
<
Route
path
=
"/"
element
=
{
accountsLoaded
?
(
accounts
.
length
>
0
?
(
<
Navigate
to
=
"/budget"
replace
/>
)
:
(
// If there are no accounts, we want to redirect the user to
// the All Accounts screen which will prompt them to add an account
<
Navigate
to
=
"/accounts"
replace
/>
)
)
:
(
<
LoadingIndicator
/>
)
}
/>
<
Route
path
=
"/reports/*"
element
=
{
<
Reports
/>
}
/>
...
...
This diff is collapsed.
Click to expand it.
upcoming-release-notes/3503.md
0 → 100644
+
6
−
0
View file @
c497d3a9
---
category
:
Maintenance
authors
:
[
MatissJanis
]
---
e2e: improve onboarding test stability.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment