fix(ci): test long string wrapping on storybook

This commit is contained in:
Łukasz Mierzwa
2019-10-27 07:56:09 +00:00
parent 392e39e621
commit 791219b152
3 changed files with 7 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ exports[`<FatalError /> matches snapshot 1`] = `
</path>
</svg>
</h1>
<p class=\\"lead text-white bg-secondary px-1 py-3 rounded\\">
<p class=\\"lead text-white bg-secondary px-1 py-3 rounded text-wrap text-break\\">
foo bar
</p>
</div>

View File

@@ -17,7 +17,7 @@ class FatalError extends Component {
<h1 className="display-1 my-5 text-danger">
<FontAwesomeIcon icon={faExclamationCircle} />
</h1>
<p className="lead text-white bg-secondary px-1 py-3 rounded">
<p className="lead text-white bg-secondary px-1 py-3 rounded text-wrap text-break">
{message}
</p>
</div>

View File

@@ -73,7 +73,9 @@ const MockGroup = (groupName, alertCount, active, suppressed, unprocessed) => {
storiesOf("Grid", module)
.add("FatalError", () => {
return <FatalError message="Something failed" />;
return (
<FatalError message="Something failed with a veryLongStringToTestTextWrappingveryLongStringToTestTextWrappingveryLongStringToTestTextWrappingveryLongStringToTestTextWrappingveryLongStringToTestTextWrappingveryLongStringToTestTextWrappingveryLongStringToTestTextWrappingveryLongStringToTestTextWrapping" />
);
})
.add("UpgradeNeeded", () => {
return <UpgradeNeeded newVersion="1.2.3" reloadAfter={100000000} />;
@@ -162,7 +164,8 @@ storiesOf("Grid", module)
{
name: "failed",
uri: "https://am.example.com",
error: "Failed to connect to https://am.example.com"
error:
"Failed to connect to https://am.example.com veryLongStringToTestTextWrappingveryLongStringToTestTextWrappingveryLongStringToTestTextWrappingveryLongStringToTestTextWrappingveryLongStringToTestTextWrappingveryLongStringToTestTextWrapping"
}
],
clusters: { am: ["am1", "am2"], failed: ["failed"] }