Skip to content

Commit

Permalink
fix: Fixed landscape connect label, fixed groups and landscapes cards…
Browse files Browse the repository at this point in the history
… link (#107)
  • Loading branch information
josebui authored Dec 21, 2021
1 parent 5b7ef40 commit a634e93
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
9 changes: 7 additions & 2 deletions src/group/components/GroupList.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,14 @@ const GroupCards = ({ groups }) => {
<Typography variant="caption">
{t('group.list_column_name')}
</Typography>
<Typography variant="body1">
<Link
variant="body1"
display="block"
component={RouterLink}
to={`/groups/${group.slug}`}
>
{group.name}
</Typography>
</Link>
</Grid>
{group.email && (
<Grid item xs={12}>
Expand Down
9 changes: 7 additions & 2 deletions src/landscape/components/LandscapeList.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,14 @@ const LandscapeCards = ({ landscapes }) => {
<Typography variant="caption">
{t('landscape.list_column_name')}
</Typography>
<Typography variant="body1">
<Link
variant="body1"
display="block"
component={RouterLink}
to={`/landscapes/${landscape.slug}`}
>
{landscape.name}
</Typography>
</Link>
</Grid>
{landscape.location && (
<Grid item xs={12}>
Expand Down
4 changes: 2 additions & 2 deletions src/landscape/components/LandscapeList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ test('LandscapeList: Display list', async () => {
expect(rows.length).toBe(11) // 10 displayed + header
expect(within(rows[2]).getByRole('cell', { name: 'Landscape Name 1' })).toHaveAttribute('data-field', 'name')
expect(within(rows[2]).getByRole('cell', { name: '23' })).toHaveAttribute('data-field', 'members')
expect(within(rows[2]).getByRole('cell', { name: 'Join' })).toHaveAttribute('data-field', 'actions')
expect(within(rows[2]).getByRole('cell', { name: 'Connect' })).toHaveAttribute('data-field', 'actions')
expect(within(rows[9]).getByRole('cell', { name: 'MEMBER' })).toHaveAttribute('data-field', 'actions')
})
test('LandscapeList: List sort', async () => {
Expand Down Expand Up @@ -229,6 +229,6 @@ test('LandscapeList: Display list (small screen)', async () => {
expect(within(rows[1]).getByText('Landscape Name 1')).toBeInTheDocument()
expect(within(rows[1]).getByText('https://www.landscape.org')).toBeInTheDocument()
expect(within(rows[1]).getByText('23')).toBeInTheDocument()
expect(within(rows[1]).getByText('Join')).toBeInTheDocument()
expect(within(rows[1]).getByText('Connect')).toBeInTheDocument()
expect(within(rows[8]).getByText('MEMBER')).toBeInTheDocument()
})
2 changes: 1 addition & 1 deletion src/localization/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"view_leave_label": "Leave Landscape",
"list_title": "Landscapes",
"list_description": "View the list of Landscapes in Terraso. Follow the landscape name link to learn more from their landscape profile.",
"list_join_button": "Join",
"list_join_button": "Connect",
"list_leave_button": "Member",
"list_column_name": "Landscape Name",
"list_column_location": "Location",
Expand Down

0 comments on commit a634e93

Please sign in to comment.