1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Add specific tab tests

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-05-04 17:20:01 +03:00
parent e3c88f3004
commit f9a5914127
2 changed files with 25 additions and 0 deletions

View File

@ -15,6 +15,8 @@ exports[`preferences - navigation to extension specific preferences given in pre
</div>
`;
exports[`preferences - navigation to extension specific preferences given in preferences, when rendered given extension with registered tab when navigating to specific extension tab renders 1`] = `<div />`;
exports[`preferences - navigation to extension specific preferences given in preferences, when rendered given multiple extensions with specific preferences, when navigating to extension specific preferences page renders 1`] = `
<div>
<div

View File

@ -184,6 +184,29 @@ describe("preferences - navigation to extension specific preferences", () => {
expect(actual).not.toBeInTheDocument();
});
describe("when navigating to specific extension tab", () => {
beforeEach(() => {
applicationBuilder.preferences.navigation.click("extension-specific-tab-navigation-item-license-extension-tab");
}
);
it("renders", () => {
expect(rendered.container).toMatchSnapshot();
}
);
it("shows related preferences for this tab", () => {
const actual = rendered.getByTestId("license-preference-item-hint");
expect(actual).toBeInTheDocument();
}
);
it("does not show unrelated preferences for this tab", () => {
const actual = rendered.queryByTestId("survey-preference-item-hint");
expect(actual).not.toBeInTheDocument();
}
);
});
});
});
});