-
Notifications
You must be signed in to change notification settings - Fork 11
fix(shell-center-row): Error when no action-bar is provided #1032
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test for this before merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL! I Was just about to make a PR for this.
@jcfranco can you review the test? I'm not sure if this is the best way to detect the error but I could not find another solution. If we do want to go with this, it seems like a good candidate to be something we test for automatically for each component. |
@@ -24,6 +24,19 @@ describe("calcite-shell-center-row", () => { | |||
} | |||
])); | |||
|
|||
it("should not error when there is no action-bar", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jcfranco could we make this test reusable like the renders
test? I don't think any components should throw a console.error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's already a way to fail on console error:
it("should not error when there is no action-bar", async () =>
await newE2EPage({
html: "<calcite-shell-center-row></calcite-shell-center-row>",
failOnConsoleError: true
}));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice. Ill test it out. Can we turn it on by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... I don't see a way to enable it globally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we maybe add this to the renders test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Related Issue: #1031
Summary
fix(shell-center-row): Error when no action-bar is provided