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

Use only 1 expect statement for each test

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-06-20 12:47:43 +03:00
parent 47cbb248bb
commit 67680cc889

View File

@ -197,6 +197,11 @@ describe("preferences - navigation to extension specific preferences", () => {
});
describe("given extension with few registered tabs", () => {
const tabs = [
"tab-link-for-extension-hello-world-tab-page-id-nav-item-hello-extension-tab",
"tab-link-for-extension-hello-world-tab-page-id-nav-item-logs-extension-tab",
];
beforeEach(async () => {
const getRendererExtensionFake = getRendererExtensionFakeFor(applicationBuilder);
const extension = getRendererExtensionFake(extensionStubWithWithRegisteredTabs);
@ -204,12 +209,10 @@ describe("preferences - navigation to extension specific preferences", () => {
await applicationBuilder.extensions.renderer.enable(extension);
});
it("shows each of registered tabs in general area", () => {
const helloTab = rendered.getByTestId("tab-link-for-extension-hello-world-tab-page-id-nav-item-hello-extension-tab");
const logsTab = rendered.getByTestId("tab-link-for-extension-hello-world-tab-page-id-nav-item-logs-extension-tab");
it.each(tabs)("shows '%s' tab in general area", (tab) => {
const tabElement = rendered.getByTestId(tab);
expect(helloTab).toBeInTheDocument();
expect(logsTab).toBeInTheDocument();
expect(tabElement).toBeInTheDocument();
});
});