Skip to content

Commit

Permalink
web: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed Apr 3, 2024
1 parent 811fff5 commit 5783762
Showing 1 changed file with 11 additions and 20 deletions.
31 changes: 11 additions & 20 deletions web/src/components/storage/device-utils.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,17 @@ const renderOptions = (Component) => {
screen.getByText("Micron 1100 SATA");
});

it("renders the partition table info", () => {
plainRender(<Component devices={[vda]} />);
screen.getByText("GPT with 2 partitions");
});

it("renders systems info", () => {
plainRender(<Component devices={[vda]} />);
screen.getByText("Windows 11");
screen.getByText("openSUSE Leap 15.2");
});

describe("when device is a SDCard", () => {
it("renders 'SD Card'", () => {
const sdCard = { ...vda, sdCard: true };
Expand All @@ -151,26 +162,6 @@ const renderOptions = (Component) => {
});
});

describe("when content is given", () => {
it("renders the partition table info", () => {
plainRender(<Component devices={[vda]} />);
screen.getByText("GPT with 2 partitions");
});

it("renders systems info", () => {
plainRender(<Component devices={[vda]} />);
screen.getByText("Windows 11");
screen.getByText("openSUSE Leap 15.2");
});
});

describe("when content is not given", () => {
it("renders 'No content found'", () => {
plainRender(<Component devices={[multipath]} />);
screen.getByText("No content found");
});
});

describe("when device is software RAID", () => {
it("renders its level", () => {
plainRender(<Component devices={[md0]} />);
Expand Down

0 comments on commit 5783762

Please sign in to comment.