Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 2586acf

Browse files
committed
Make rendering PhantomJS compatible to run complex tests
1 parent 4d1df66 commit 2586acf

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ui/src/app/streams/flo/render.service.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,11 @@ export class RenderService implements Flo.Renderer {
318318
const isTapLink = link.attr('props/isTapLink');
319319
const linkView = paper ? paper.findViewByModel(link) : undefined;
320320
if (linkView) {
321-
// TODO: Check if need to switch bacl to _.each(...)
322-
if (isTapLink === true) {
323-
linkView.el.querySelectorAll('.connection, .marker-source, .marker-target')
321+
if (isTapLink) {
322+
linkView.$('.connection, .marker-source, .marker-target').toArray()
324323
.forEach(connection => joint.V(connection).addClass('tapped-output-from-app'));
325324
} else {
326-
linkView.el.querySelectorAll('.connection, .marker-source, .marker-target')
325+
linkView.$('.connection, .marker-source, .marker-target').toArray()
327326
.forEach(connection => joint.V(connection).removeClass('tapped-output-from-app'));
328327
}
329328
}

ui/src/app/streams/stream-graph-view/stream-graph-view.component.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@ describe('StreamGraphViewComponent', () => {
5252
});
5353

5454
it('check stream in the view', (done) => {
55-
component.dsl = 'http';
55+
component.dsl = 'http | filter | null';
5656
fixture.detectChanges();
5757
const subscription = component.flo.textToGraphConversionSubject.subscribe(() => {
5858
subscription.unsubscribe();
59-
expect(component.flo.getGraph().getElements().length).toEqual(1);
59+
expect(component.flo.getGraph().getElements().length).toEqual(3);
60+
expect(component.flo.getGraph().getLinks().length).toEqual(2);
6061
done();
6162
});
6263
});

0 commit comments

Comments
 (0)