Skip to content

Commit

Permalink
Corrected tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RoJosGaRis committed Jun 15, 2024
1 parent 8517795 commit 399e90f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions knowx/src/tests/compare/Compare_Card.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe("Compare_Card", () => {

expect(screen.getByText("Initial Title")).toBeInTheDocument()
expect(screen.getByText("Initial Description")).toBeInTheDocument()
expect(screen.getByText("Category1: Value1")).toBeInTheDocument()
expect(screen.getByText("Category1")).toBeInTheDocument()
})

it("updates data on title selection", () => {
Expand All @@ -50,6 +50,6 @@ describe("Compare_Card", () => {

expect(screen.getByText("Service1")).toBeInTheDocument()
expect(screen.getByText("Description1")).toBeInTheDocument()
expect(screen.getByText("Category1: Value1")).toBeInTheDocument()
expect(screen.getByText("Category1")).toBeInTheDocument()
})
})
4 changes: 2 additions & 2 deletions knowx/src/tests/dashboard/inputBar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ test("Input Bar Correct Redirect Test", async () => {

// Click on the search button
act(() => {
screen.getByTitle("Search Button").click()
screen.getByTitle("searchButton").click()
})

// Check if the navigate function was called with the correct argument
Expand All @@ -83,7 +83,7 @@ test("Input Bar Correct Redirect Test 2", async () => {

// Click on the search button
act(() => {
screen.getByTitle("Search Button").click()
screen.getByTitle("searchButton").click()
})

// Check if the navigate function was called with the correct argument
Expand Down
4 changes: 2 additions & 2 deletions knowx/src/tests/history/checkUserMenu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test("Check User Menu on Dashboard", async () => {
)

act(() => {
screen.getByRole("button", { name: "" }).click()
screen.getByRole("button", { name: "dropdown-btn" }).click()
})

expect(screen.getByText("History")).toBeVisible()
Expand All @@ -43,7 +43,7 @@ test("Check User Menu on History", async () => {
)

act(() => {
screen.getByRole("button", { name: "" }).click()
screen.getByRole("button", { name: "dropdown-btn" }).click()
})

expect(screen.getByText("Dashboard")).toBeVisible()
Expand Down
2 changes: 1 addition & 1 deletion knowx/src/tests/history/historyList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ test("Search History List Redirect Test", async () => {
act(() => {
screen
.getByRole("row", {
name: "test",
name: "test 1/1/2021 6:00",
})
.click()
})
Expand Down

0 comments on commit 399e90f

Please sign in to comment.