Skip to content

Commit

Permalink
tests: add coverage for new job properties
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <[email protected]>
  • Loading branch information
traeok committed Jan 10, 2025
1 parent 9f84deb commit d41700a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ export function createIJobObject() {
type: "JOB",
url: "fake/url",
"exec-member": "sampleMember",
"exec-ended": "2024-03-07T00:04:67:980z",
"exec-ended": "2024-03-07T00:04:27:980z",
"exec-started": "2024-03-06T00:04:27:100z",
"exec-submitted": "2024-03-07T00:04:07:000z",
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,5 +208,13 @@ describe("JobTableView unit tests", () => {
const expectedProperties = { ...blockMocks.jobNode.job };
expect((JobTableView as any).jobPropertiesFor(blockMocks.jobNode)).toStrictEqual(expectedProperties);
});

it("returns exec-started, exec-submitted and exec-ended properties from the job node", () => {
const blockMocks = getBlockMocks();
const jobProperties = (JobTableView as any).jobPropertiesFor(blockMocks.jobNode);
expect(jobProperties).toHaveProperty("exec-started");
expect(jobProperties).toHaveProperty("exec-submitted");
expect(jobProperties).toHaveProperty("exec-ended");
});
});
});
1 change: 0 additions & 1 deletion packages/zowe-explorer/src/trees/job/JobTableView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ export class JobTableView {
await this.table.setTitle(this.buildTitle(profileNode));
await this.table.setContent(jobProperties);
} else {
const jobProperties = JobTableView.cachedChildren.map((item) => this.jobPropertiesFor(item));
this.table = new TableBuilder(context)
.options({
autoSizeStrategy: { type: "fitCellContents" },
Expand Down

0 comments on commit d41700a

Please sign in to comment.