Skip to content

Commit

Permalink
Merge pull request #135 from fga-eps-mds/revert-134-Arrumar_TopTopics…
Browse files Browse the repository at this point in the history
…_e_NewTopics

Revert "Adding topTopics request to forum and resolve topic navigation"
  • Loading branch information
joaovitorml authored Dec 16, 2020
2 parents 56a28c2 + e6f7b4a commit 15daac9
Show file tree
Hide file tree
Showing 14 changed files with 121 additions and 183 deletions.
30 changes: 5 additions & 25 deletions __tests__/__snapshots__/topicCreate.test.native.js.snap.android
Original file line number Diff line number Diff line change
Expand Up @@ -27,35 +27,15 @@ exports[`<TopicCreate /> renders everything 1`] = `
}
}
>
<View
accessible={true}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
<Text />
<Text
style={
Object {
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "center",
"opacity": 1,
"color": "rgba(214,218,223,1.0)",
"fontSize": 15,
}
}
>
<Text />
<Text
style={
Object {
"color": "rgba(214,218,223,1.0)",
"fontSize": 15,
}
}
/>
</View>
/>
<View
accessible={true}
focusable={true}
Expand Down
30 changes: 5 additions & 25 deletions __tests__/__snapshots__/topicCreate.test.native.js.snap.ios
Original file line number Diff line number Diff line change
Expand Up @@ -27,35 +27,15 @@ exports[`<TopicCreate /> renders everything 1`] = `
}
}
>
<View
accessible={true}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
<Text />
<Text
style={
Object {
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "center",
"opacity": 1,
"color": "rgba(214,218,223,1.0)",
"fontSize": 15,
}
}
>
<Text />
<Text
style={
Object {
"color": "rgba(214,218,223,1.0)",
"fontSize": 15,
}
}
/>
</View>
/>
<View
accessible={true}
focusable={true}
Expand Down
45 changes: 22 additions & 23 deletions __tests__/__snapshots__/topicView.test.native.js.snap.android
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<TopicView /> renders everything 1`] = `
exports[`<TopicCreate /> renders everything 1`] = `
<View
onLayout={[Function]}
style={
Expand All @@ -27,25 +27,21 @@ exports[`<TopicView /> renders everything 1`] = `
}
>
<View
accessible={true}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"alignItems": "center",
"flex": 0.8,
"flexDirection": "row",
"opacity": 1,
"flex": 0.1,
}
}
>
<Text />
</View>
<View
style={
Object {
"flex": 0.9,
}
}
>
<Text
style={
Object {
Expand All @@ -55,13 +51,6 @@ exports[`<TopicView /> renders everything 1`] = `
}
/>
</View>
<View
style={
Object {
"flex": 0.2,
}
}
/>
</View>
<View
style={
Expand Down Expand Up @@ -121,8 +110,8 @@ exports[`<TopicView /> renders everything 1`] = `
}
}
>
1116717
dias atrás
NaN
minutos atrás
</Text>
</View>
</View>
Expand Down Expand Up @@ -171,6 +160,7 @@ exports[`<TopicView /> renders everything 1`] = `
/>
</View>
</RCTScrollView>
<Text />
<View
style={
Object {
Expand Down Expand Up @@ -199,6 +189,15 @@ exports[`<TopicView /> renders everything 1`] = `
<Text />
<Text />
</View>
<View
style={
Object {
"flexDirection": "row",
}
}
>
<Text />
</View>
<View
style={
Object {
Expand Down
45 changes: 22 additions & 23 deletions __tests__/__snapshots__/topicView.test.native.js.snap.ios
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<TopicView /> renders everything 1`] = `
exports[`<TopicCreate /> renders everything 1`] = `
<View
onLayout={[Function]}
style={
Expand All @@ -27,25 +27,21 @@ exports[`<TopicView /> renders everything 1`] = `
}
>
<View
accessible={true}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"alignItems": "center",
"flex": 0.8,
"flexDirection": "row",
"opacity": 1,
"flex": 0.1,
}
}
>
<Text />
</View>
<View
style={
Object {
"flex": 0.9,
}
}
>
<Text
style={
Object {
Expand All @@ -55,13 +51,6 @@ exports[`<TopicView /> renders everything 1`] = `
}
/>
</View>
<View
style={
Object {
"flex": 0.2,
}
}
/>
</View>
<View
style={
Expand Down Expand Up @@ -121,8 +110,8 @@ exports[`<TopicView /> renders everything 1`] = `
}
}
>
1116717
dias atrás
NaN
minutos atrás
</Text>
</View>
</View>
Expand Down Expand Up @@ -171,6 +160,7 @@ exports[`<TopicView /> renders everything 1`] = `
/>
</View>
</RCTScrollView>
<Text />
<View
style={
Object {
Expand Down Expand Up @@ -199,6 +189,15 @@ exports[`<TopicView /> renders everything 1`] = `
<Text />
<Text />
</View>
<View
style={
Object {
"flexDirection": "row",
}
}
>
<Text />
</View>
<View
style={
Object {
Expand Down
15 changes: 9 additions & 6 deletions __tests__/topicCreate.test.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ describe('<TopicCreate />', () => {
.create(<TopicCreate navigation={{ getParam: jest.fn() }} />)
.toJSON();
expect(tree).toMatchSnapshot();
expect(wrapper.find('View').length).toBe(18);
expect(wrapper.find('View').length).toBe(16);
expect(wrapper.find('Text').length).toBe(10);
expect(wrapper.find('TouchableOpacity').length).toBe(2);
expect(wrapper.find('TouchableOpacity').length).toBe(1);
expect(wrapper.find('Icon').length).toBe(2);
expect(wrapper.find('TextInput').length).toBe(2);
});
Expand All @@ -33,12 +33,12 @@ describe('<TopicCreate />', () => {
styles.TopicCreatemasterView
);
expect(wrapper.find('View').at(2)).toHaveStyle(styles.TopicCreateheader);
expect(wrapper.find('View').at(8)).toHaveStyle(styles.TopicCreatecontainer);
expect(wrapper.find('View').at(10)).toHaveStyle(styles.TopicCreateUserDiv);
expect(wrapper.find('View').at(12)).toHaveStyle(
expect(wrapper.find('View').at(6)).toHaveStyle(styles.TopicCreatecontainer);
expect(wrapper.find('View').at(8)).toHaveStyle(styles.TopicCreateUserDiv);
expect(wrapper.find('View').at(10)).toHaveStyle(
styles.TopicCreatetituloDiv
);
expect(wrapper.find('View').at(16)).toHaveStyle(
expect(wrapper.find('View').at(14)).toHaveStyle(
styles.TopicCreatescrollDiv
);
});
Expand All @@ -55,6 +55,9 @@ describe('<TopicCreate />', () => {
expect(wrapper.find('Text').at(8)).toHaveText('username');
});
it('renders TouchableOpacity correctly', () => {
expect(wrapper.find('TouchableOpacity').at(0)).toHaveStyle(
styles.TopicCreatepublicarDiv
);
expect(wrapper.find('TouchableOpacity').at(0)).toHaveProp('onPress');
});
it('renders Icon correctly', () => {
Expand Down
Loading

0 comments on commit 15daac9

Please sign in to comment.