Skip to content

Commit

Permalink
Tests for progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
PetarSimonovic committed Dec 4, 2023
1 parent 4c19f15 commit 32b5b6d
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ describe("It renders project steps when there is no quiz", () => {
top: 0,
});
});

test("Renders the progress bar", () => {
expect(screen.queryByRole("progressbar")).toBeInTheDocument();
});
});

describe("It renders a question when a quiz is available", () => {
describe("It can render a quiz", () => {
beforeEach(() => {
const mockStore = configureStore([]);
const initialState = {
Expand All @@ -61,7 +65,7 @@ describe("It renders a question when a quiz is available", () => {
);
});

test("Renders with correct quiz content content", () => {
test("Renders the quiz content", () => {
expect(screen.queryByText("Test quiz")).toBeInTheDocument();
});

Expand All @@ -70,4 +74,8 @@ describe("It renders a question when a quiz is available", () => {
top: 0,
});
});

test("Removes the progress bar", () => {
expect(screen.queryByRole("progressbar")).not.toBeInTheDocument();
});
});

0 comments on commit 32b5b6d

Please sign in to comment.