Skip to content

Commit 63e0b68

Browse files
committed
update identifier test
1 parent 94c10c3 commit 63e0b68

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/Identifier/Identifier.test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ describe('<Identifier />', () => {
2121
);
2222
const accentColor = <Identifier size="m" glyph="money-bills" color={9} />;
2323

24+
const bgImage = (
25+
<Identifier
26+
backgroundImageUrl="https://placeimg.com/400/400/nature"
27+
modifier="circle"
28+
/>
29+
);
30+
2431
test('Create identifier', () => {
2532
// create default icon
2633
let component = renderer.create(defaultIcon);
@@ -46,5 +53,10 @@ describe('<Identifier />', () => {
4653
component = renderer.create(accentColor);
4754
tree = component.toJSON();
4855
expect(tree).toMatchSnapshot();
56+
57+
// create background image icon
58+
component = renderer.create(bgImage);
59+
tree = component.toJSON();
60+
expect(tree).toMatchSnapshot();
4961
});
5062
});

src/Identifier/__snapshots__/Identifier.test.js.snap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,15 @@ exports[`<Identifier /> Create identifier 5`] = `
3737
role="presentation"
3838
/>
3939
`;
40+
41+
exports[`<Identifier /> Create identifier 6`] = `
42+
<span
43+
className="fd-identifier fd-identifier--circle fd-identifier--thumbnail"
44+
role="presentation"
45+
style={
46+
Object {
47+
"backgroundImage": "url(https://placeimg.com/400/400/nature)",
48+
}
49+
}
50+
/>
51+
`;

0 commit comments

Comments
 (0)