Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit f28a2f1

Browse files
authored
Merge pull request #199 from FileFighter/feature/changeLandingPage
Set files as LandingPage
2 parents 88a3e09 + dc0c0b5 commit f28a2f1

File tree

4 files changed

+21
-9
lines changed

4 files changed

+21
-9
lines changed

cypress/integration/login_spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ describe("The Home Page", () => {
1414
// {enter} causes the form to submit
1515
cy.get("input[id=formBasicPassword]").type(`${password}{enter}`);
1616

17+
cy.get("span.navbar-link-description")
18+
.contains("Health")
19+
.click();
20+
1721
// UI should reflect this user being logged in
1822
cy.get("h1").should("contain", "FileFighter");
1923

cypress/integration/register_spec.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ describe("The register Page", () => {
1111
});
1212

1313
it("registers a user successfully", () => {
14+
cy.get("span.navbar-link-description")
15+
.contains("Health")
16+
.click();
17+
1418
cy.get("#ff-heath-table > tbody > tr:nth-child(4) > td:nth-child(2)")
1519
.contains(/^\d+/)
1620
.then(($tr) => {
@@ -33,7 +37,7 @@ describe("The register Page", () => {
3337
cy.get("#formConfirmPassword").type(password);
3438

3539
cy.get(".btn.btn-primary").contains("Submit").click();
36-
cy.get("span.navbar-link-description").contains("Main").click();
40+
cy.get("span.navbar-link-description").contains("Health").click();
3741

3842
cy.logout();
3943

@@ -43,6 +47,10 @@ describe("The register Page", () => {
4347
`${password}{enter}`
4448
);
4549

50+
cy.get("span.navbar-link-description")
51+
.contains("Health")
52+
.click();
53+
4654
cy.get("h1").should("contain", "FileFighter");
4755

4856
let newUserCount = (parseInt(currentUserCount) + 1).toString();

src/components/Router/Router.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ import Profile from "../pages/User/Profile";
1010
export default function Router(): ReactElement {
1111
return (
1212
<Switch>
13-
<Route exact path={"/"} component={Health} />
1413
<Route path={"/login"} component={Login} />
14+
<Route exact path={"/"}>
15+
<Redirect to={filesBaseUrl}/>
16+
</Route>
1517
<Route path={"/start"}>
1618
<Redirect to={"/"} />
1719
</Route>
20+
<Route path={"/health"} component={Health}/>
1821
<Route path={filesBaseUrl} component={FileSystem} />
19-
<Route path={"/health"}>
20-
<Redirect to={"/"} />
21-
</Route>
2222
<Route path={"/registration"} component={Registration} />
2323
{<Route path={"/profile"} component={Profile} />}
2424
<Route path={"*"} component={Error404} />

src/components/basicElements/topArea/Header.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ function Header(props: PropsFromRedux): ReactElement {
3535
const history = useHistory();
3636
const navBarElements: navBarElement_Interface[] = [
3737
{
38-
name: "main",
39-
text: "Main",
40-
link: "/",
41-
deviantVisibleLink: "/start",
38+
name: "health",
39+
text: "Health",
40+
link: "/health",
41+
deviantVisibleLink: "/health",
4242
logo: null
4343
},
4444
{

0 commit comments

Comments
 (0)