Skip to content

Commit 80d36d4

Browse files
authored
Add missing pages (#24)
1 parent 9eb923b commit 80d36d4

File tree

5 files changed

+57
-8
lines changed

5 files changed

+57
-8
lines changed

cypress/integration/issue-list.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@ describe("Issue List", () => {
3737

3838
it("renders the issues", () => {
3939
cy.get("main")
40+
.find("tbody")
4041
.find("tr")
4142
.each(($el, index) => {
42-
// skip the header row
43-
if (index === 0) return;
44-
45-
const issue = mockIssues1.items[index - 1];
43+
const issue = mockIssues1.items[index];
4644
const firstLineOfStackTrace = issue.stack.split("\n")[1].trim();
4745
cy.wrap($el).contains(issue.name);
4846
cy.wrap($el).contains(issue.message);

cypress/integration/navigation.spec.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,30 @@ describe("Sidebar Navigation", () => {
99
});
1010

1111
it("links are working", () => {
12-
// check that issues link leads to the right page
12+
// check that each link leads to the correct page
1313
cy.get("nav").contains("Issues").click();
1414
cy.url().should("eq", "http://localhost:3000/issues");
1515

16-
// check that projects link leads to the right page
1716
cy.get("nav").contains("Projects").click();
1817
cy.url().should("eq", "http://localhost:3000/");
18+
19+
cy.get("nav").contains("Alerts").click();
20+
cy.url().should("eq", "http://localhost:3000/alerts");
21+
22+
cy.get("nav").contains("Users").click();
23+
cy.url().should("eq", "http://localhost:3000/users");
24+
25+
cy.get("nav").contains("Settings").click();
26+
cy.url().should("eq", "http://localhost:3000/settings");
1927
});
2028

2129
it("is collapsible", () => {
2230
// collapse navigation
2331
cy.get("nav").contains("Collapse").click();
2432

25-
// check that links still exist
26-
cy.get("nav").find("a").should("have.length", 5);
33+
// check that links still exist and are functionable
34+
cy.get("nav").find("a").should("have.length", 5).eq(1).click();
35+
cy.url().should("eq", "http://localhost:3000/issues");
2736

2837
// check that text is not rendered
2938
cy.get("nav").contains("Issues").should("not.exist");

pages/alerts.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { PageContainer } from "@features/ui";
2+
import type { NextPage } from "next";
3+
4+
const IssuesPage: NextPage = () => {
5+
return (
6+
<PageContainer
7+
title="Alerts"
8+
info="Set up alerts to received notifications for certain issues or thresholds"
9+
>
10+
This page has yet to be implemented
11+
</PageContainer>
12+
);
13+
};
14+
15+
export default IssuesPage;

pages/settings.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { PageContainer } from "@features/ui";
2+
import type { NextPage } from "next";
3+
4+
const IssuesPage: NextPage = () => {
5+
return (
6+
<PageContainer title="Settings" info="The account settings">
7+
This page has yet to be implemented
8+
</PageContainer>
9+
);
10+
};
11+
12+
export default IssuesPage;

pages/users.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { PageContainer } from "@features/ui";
2+
import type { NextPage } from "next";
3+
4+
const IssuesPage: NextPage = () => {
5+
return (
6+
<PageContainer
7+
title="Issues"
8+
info="Overview of the users able to access your account."
9+
>
10+
This page has yet to be implemented
11+
</PageContainer>
12+
);
13+
};
14+
15+
export default IssuesPage;

0 commit comments

Comments
 (0)