Skip to content

Commit 5335651

Browse files
authored
Merge pull request #3008 from topcoder-platform/develop
Contentful updates
2 parents 8ccad50 + a61491c commit 5335651

File tree

31 files changed

+2799
-734
lines changed

31 files changed

+2799
-734
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import React from 'react';
2+
import Renderer from 'react-test-renderer/shallow';
3+
import { ImageInner } from 'components/Contentful/Image/Image';
4+
5+
test('Matches shallow shapshot', () => {
6+
const renderer = new Renderer();
7+
const MOCK_PROPS = {
8+
id: '1',
9+
image: {},
10+
imageSource: {
11+
file: {
12+
url: 'https://www.topcoder.com',
13+
},
14+
},
15+
clipSvg: {
16+
file: {
17+
url: 'https://www.topcoder.com',
18+
},
19+
},
20+
theme: {},
21+
};
22+
renderer.render(<ImageInner {...MOCK_PROPS} />);
23+
expect(renderer.getRenderOutput()).toMatchSnapshot();
24+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Matches shallow shapshot 1`] = `
4+
<div
5+
id="image-1"
6+
>
7+
<InlineSVG
8+
baseURL=""
9+
cacheGetRequests={false}
10+
onLoad={[Function]}
11+
preloader={
12+
<ThemedLoadingIndicator
13+
composeAdhocTheme="deeply"
14+
composeContextTheme="softly"
15+
mapThemrProps={[Function]}
16+
themePriority="adhoc-context-default"
17+
/>
18+
}
19+
src="https://www.topcoder.com"
20+
supportTest={[Function]}
21+
uniquifyIDs={true}
22+
wrapper={[Function]}
23+
/>
24+
<img
25+
alt=""
26+
src="https://www.topcoder.com"
27+
style={
28+
Object {
29+
"display": "none",
30+
}
31+
}
32+
/>
33+
</div>
34+
`;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React from 'react';
2+
import Renderer from 'react-test-renderer/shallow';
3+
import { ShapeInner } from 'components/Contentful/Shape/Shape';
4+
5+
test('Matches shallow shapshot', () => {
6+
const renderer = new Renderer();
7+
const MOCK_PROPS = {
8+
id: '1',
9+
shape: {},
10+
shapeSvg: {
11+
file: {
12+
url: 'https://www.topcoder.com',
13+
},
14+
},
15+
theme: {},
16+
};
17+
renderer.render(<ShapeInner {...MOCK_PROPS} />);
18+
expect(renderer.getRenderOutput()).toMatchSnapshot();
19+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Matches shallow shapshot 1`] = `
4+
<div
5+
id="1"
6+
style={
7+
Object {
8+
"backgroundImage": "url(https://www.topcoder.com)",
9+
}
10+
}
11+
/>
12+
`;

docs/contentful/miscellaneous-CSS-solutions.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,12 @@ Content
2020
"justify-content": "space-between",
2121
"flex": "auto"
2222
}
23-
```
23+
```
24+
25+
## Position banner content left/right
26+
Put this custom CSS on content field.
27+
```
28+
{
29+
"margin-left/right": "calc(100vw - 50%)
30+
}
31+
```

0 commit comments

Comments
 (0)