Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.

Commit 876e5e4

Browse files
committed
Fix ObjectWithURL rendering.
The getTitle function wasn't called with the expected arguments.
1 parent 95924ca commit 876e5e4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/devtools-reps/src/reps/object-with-url.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function ObjectWithURL(props) {
2929
"data-link-actor-id": grip.actor,
3030
className: "objectBox objectBox-" + getType(grip)
3131
},
32-
getTitle(props, grip),
32+
getTitle(grip),
3333
span({className: "objectPropValue"}, getDescription(grip))
3434
)
3535
);

packages/devtools-reps/src/reps/tests/object-with-url.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ describe("ObjectWithURL", () => {
2424
const renderedComponent = shallow(ObjectWithURL.rep({
2525
object: stub
2626
}));
27-
const innerNode = renderedComponent.find(".objectPropValue");
28-
27+
expect(renderedComponent.text()).toBe("Location https://www.mozilla.org/en-US/");
2928
expect(renderedComponent.hasClass("objectBox-Location")).toBe(true);
29+
30+
const innerNode = renderedComponent.find(".objectPropValue");
3031
expect(innerNode.text()).toBe("https://www.mozilla.org/en-US/");
32+
3133
expectActorAttribute(renderedComponent, stub.actor);
3234
});
3335
});

0 commit comments

Comments
 (0)