Skip to content
Snippets Groups Projects
Unverified Commit 0dd55369 authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins Committed by GitHub
Browse files

:bug: navigation back to config-server page after clicking on "no server" (#851)


Closes #842

---------

Co-authored-by: default avatarJed Fox <git@jedfox.com>
parent 072c3504
No related branches found
No related tags found
No related merge requests found
...@@ -68,4 +68,13 @@ test.describe('Onboarding', () => { ...@@ -68,4 +68,13 @@ test.describe('Onboarding', () => {
await expect(accountPage.accountName).toHaveText('All Accounts'); await expect(accountPage.accountName).toHaveText('All Accounts');
await expect(accountPage.accountBalance).toHaveText('0.00'); await expect(accountPage.accountBalance).toHaveText('0.00');
}); });
test('navigates back to start page by clicking on "no server" in an empty budget file', async () => {
await configurationPage.clickOnNoServer();
await configurationPage.startFresh();
await navigation.clickOnNoServer();
expect(await configurationPage.heading).toHaveText('Where’s the server?');
});
}); });
...@@ -3,6 +3,8 @@ import { BudgetPage } from './budget-page'; ...@@ -3,6 +3,8 @@ import { BudgetPage } from './budget-page';
export class ConfigurationPage { export class ConfigurationPage {
constructor(page) { constructor(page) {
this.page = page; this.page = page;
this.heading = page.getByRole('heading');
} }
async createTestFile() { async createTestFile() {
......
...@@ -70,4 +70,8 @@ export class Navigation { ...@@ -70,4 +70,8 @@ export class Navigation {
await this.page.getByRole('button', { name: 'Create' }).click(); await this.page.getByRole('button', { name: 'Create' }).click();
return new AccountPage(this.page); return new AccountPage(this.page);
} }
async clickOnNoServer() {
await this.page.getByRole('button', { name: 'No server' }).click();
}
} }
import React, { useEffect } from 'react'; import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Switch, Redirect, Router, Route } from 'react-router-dom'; import { Switch, Redirect, Router, Route } from 'react-router-dom';
...@@ -58,7 +58,7 @@ function ManagementApp({ ...@@ -58,7 +58,7 @@ function ManagementApp({
getUserData, getUserData,
loadAllFiles, loadAllFiles,
}) { }) {
const history = createBrowserHistory(); const [history] = useState(createBrowserHistory);
window.__history = history; window.__history = history;
// runs on mount only // runs on mount only
......
...@@ -80,7 +80,7 @@ export function getEmail(location) { ...@@ -80,7 +80,7 @@ export function getEmail(location) {
export function Title({ text }) { export function Title({ text }) {
return ( return (
<Text <h1
style={{ style={{
fontSize: 40, fontSize: 40,
fontWeight: 700, fontWeight: 700,
...@@ -89,7 +89,7 @@ export function Title({ text }) { ...@@ -89,7 +89,7 @@ export function Title({ text }) {
}} }}
> >
{text} {text}
</Text> </h1>
); );
} }
......
---
category: Bugfix
authors: [MatissJanis]
---
Fix "no server" link no longer working
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment