Skip to content

Commit

Permalink
remove jest since buttons have moved to parent
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed Sep 21, 2024
1 parent 8e6449a commit ea041f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,61 +44,6 @@ jest.mock("@/stores/workflowStore", () => {
};
});

describe("WorkflowInvocationOverview.vue with terminal invocation", () => {
let wrapper;
let propsData;

beforeEach(async () => {
propsData = {
invocation: invocationData,
invocationAndJobTerminal: true,
invocationSchedulingTerminal: true,
jobStatesSummary: {},
};
wrapper = shallowMount(WorkflowInvocationOverview, {
propsData,
localVue,
pinia: createTestingPinia(),
});
});

it("displays pdf report links", async () => {
expect(wrapper.find(".invocation-pdf-link").exists()).toBeTruthy();
});

it("doesn't show cancel invocation button", async () => {
expect(wrapper.find(".cancel-workflow-scheduling").exists()).toBeFalsy();
});
});

describe("WorkflowInvocationOverview.vue with invocation scheduling running", () => {
let wrapper;
let propsData;
let store;

beforeEach(async () => {
propsData = {
invocation: invocationData,
invocationAndJobTerminal: false,
invocationSchedulingTerminal: false,
jobStatesSummary: {},
};
wrapper = shallowMount(WorkflowInvocationOverview, {
store,
propsData,
localVue,
});
});

it("does not display pdf report links", async () => {
expect(wrapper.find(".invocation-pdf-link").exists()).toBeFalsy();
});

it("shows cancel invocation button", async () => {
expect(wrapper.find(".cancel-workflow-scheduling").exists()).toBeTruthy();
});
});

describe("WorkflowInvocationOverview.vue for a valid/invalid workflow", () => {
async function loadWrapper(invocationData) {
const propsData = {
Expand All @@ -110,6 +55,7 @@ describe("WorkflowInvocationOverview.vue for a valid/invalid workflow", () => {
const wrapper = shallowMount(WorkflowInvocationOverview, {
propsData,
localVue,
pinia: createTestingPinia(),
});
await flushPromises();
return wrapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,12 @@ function cancelWorkflowSchedulingLocal() {
</BAlert>
</BTab>
<template v-slot:tabs-end>
<BNavItem v-if="!invocationAndJobTerminal" class="invocation-pdf-link ml-auto alert-info mr-1">
<BNavItem v-if="!invocationAndJobTerminal" class="ml-auto alert-info mr-1">
<LoadingSpan message="Waiting to complete invocation" />
<BButton
v-b-tooltip.noninteractive.hover
class="cancel-workflow-scheduling"
title="Cancel scheduling of workflow invocation"
data-description="cancel invocation button"
size="sm"
variant="danger"
@click="onCancel">
Expand All @@ -240,8 +240,9 @@ function cancelWorkflowSchedulingLocal() {
</BNavItem>
<li
role="presentation"
class="nav-item align-self-center invocation-pdf-link mr-2"
:class="{ 'ml-auto': invocationAndJobTerminal }">
class="nav-item align-self-center mr-2"
:class="{ 'ml-auto': invocationAndJobTerminal }"
data-description="generate pdf report button">
<BButton
v-b-tooltip.hover.bottom.noninteractive
:title="invocationStateSuccess ? generatePdfTooltip : disabledReportTooltip"
Expand Down

0 comments on commit ea041f5

Please sign in to comment.