Skip to content

Commit

Permalink
fix(313) - Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivam-Gu authored and lordrip committed Nov 22, 2023
1 parent e788239 commit 8e304aa
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions packages/ui/src/models/camel/camel-route-resource.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,27 @@ describe('CamelRouteResource', () => {
});

describe('getCompatibleComponents', () => {
it('should not provide isProducerOnly components', () => {
it('should not provide ProducerOnly components', () => {
const resource = createCamelResource(camelRouteJson);
expect(resource.getCompatibleComponents(AddStepMode.ReplaceStep, { path: 'from', label: 'timer' })).toBeDefined;
expect(resource.getCompatibleComponents(AddStepMode.ReplaceStep, { path: 'from', label: 'timer' })).toBeDefined();
});

it('should provide consumerOnly components', () => {
it('should not provide consumerOnly components', () => {
const resource = new CamelRouteResource(camelRouteJson);
expect(
resource.getCompatibleComponents(AddStepMode.ReplaceStep, {
path: 'from.steps.2.to',
processorName: 'to',
label: 'timer',
}),
).toBeDefined;
).toBeDefined();
});

it('scenario for InsertSpecialChild', () => {
const resource = createCamelResource(camelRouteJson);
expect(resource.getCompatibleComponents(AddStepMode.InsertSpecialChildStep, { path: 'from', label: 'timer' }))
.toBeDefined;
expect(
resource.getCompatibleComponents(AddStepMode.InsertSpecialChildStep, { path: 'from', label: 'timer' }),
).toBeDefined();
});

it('scenario for a new step before an existing step', () => {
Expand All @@ -51,7 +52,7 @@ describe('getCompatibleComponents', () => {
processorName: 'to',
label: 'timer',
}),
).toBeDefined;
).toBeDefined();
});

it('scenario for a new step after an existing step', () => {
Expand All @@ -62,6 +63,6 @@ describe('getCompatibleComponents', () => {
processorName: 'to',
label: 'timer',
}),
).toBeDefined;
).toBeDefined();
});
});

0 comments on commit 8e304aa

Please sign in to comment.