Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit b187b5c

Browse files
committed
test(layout): add basic test for communities page
1 parent 5b65ca6 commit b187b5c

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

containers/CommunitiesBanner/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const CommunitiesBannerContainer = ({ communitiesBanner }) => {
3636
} = communitiesBanner
3737

3838
return (
39-
<BannerContainer>
39+
<BannerContainer testid="communities-banner">
4040
<BannerContentWrapper>
4141
<ContentWrapper>
4242
<SearchBox

containers/CommunitiesBanner/styles/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import styled from 'styled-components'
22

33
import { theme, cs } from '@utils'
44

5-
export const BannerContainer = styled.div`
5+
export const BannerContainer = styled.div.attrs(props => ({
6+
'data-testid': props.testid,
7+
}))`
68
${cs.flexColumn('justify-center')};
79
810
position: relative;

cypress/integration/layout.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,14 @@ describe('basic layout', () => {
1818
cy.id('header-search').should('be.visible')
1919
cy.id('header-search-icon').should('be.visible')
2020
})
21+
22+
it('communities page', () => {
23+
cy.visit('/communities')
24+
cy.id('header-search').should('be.visible')
25+
cy.id('header-search-icon').should('be.visible')
26+
27+
cy.id('communities-banner').should('be.visible')
28+
29+
cy.id('footer').should('be.visible')
30+
})
2131
})

0 commit comments

Comments
 (0)