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:
parent
47cbb248bb
commit
67680cc889
@ -197,6 +197,11 @@ describe("preferences - navigation to extension specific preferences", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("given extension with few registered tabs", () => {
|
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 () => {
|
beforeEach(async () => {
|
||||||
const getRendererExtensionFake = getRendererExtensionFakeFor(applicationBuilder);
|
const getRendererExtensionFake = getRendererExtensionFakeFor(applicationBuilder);
|
||||||
const extension = getRendererExtensionFake(extensionStubWithWithRegisteredTabs);
|
const extension = getRendererExtensionFake(extensionStubWithWithRegisteredTabs);
|
||||||
@ -204,12 +209,10 @@ describe("preferences - navigation to extension specific preferences", () => {
|
|||||||
await applicationBuilder.extensions.renderer.enable(extension);
|
await applicationBuilder.extensions.renderer.enable(extension);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("shows each of registered tabs in general area", () => {
|
it.each(tabs)("shows '%s' tab in general area", (tab) => {
|
||||||
const helloTab = rendered.getByTestId("tab-link-for-extension-hello-world-tab-page-id-nav-item-hello-extension-tab");
|
const tabElement = rendered.getByTestId(tab);
|
||||||
const logsTab = rendered.getByTestId("tab-link-for-extension-hello-world-tab-page-id-nav-item-logs-extension-tab");
|
|
||||||
|
|
||||||
expect(helloTab).toBeInTheDocument();
|
expect(tabElement).toBeInTheDocument();
|
||||||
expect(logsTab).toBeInTheDocument();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user