Skip to content

Commit aa29c78

Browse files
authored
Merge pull request #185 from scientist-softserv/255-e2e-pages-home
add data-cy for webstore home page test
2 parents 8e791ea + 1ed5a01 commit aa29c78

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/components/SearchBar/SearchBar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const SearchBar = ({ addClass, initialValue, onSubmit, placeholder }) => {
1414

1515
return (
1616
<div className={`search-bar-container ${addClass}`}>
17-
<form className='search-bar-form' method='get' onSubmit={handleSubmit}>
17+
<form className='search-bar-form' method='get' onSubmit={handleSubmit} data-cy='search-bar'>
1818
<label>
1919
<span className='visually-hidden'>Search all services</span>
2020
</label>

src/compounds/ItemGroup/ItemGroup.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import './item-group.scss'
99
const ItemGroup = ({ buttonProps, items, isLoading, orientation, withButtonLink, withTitleLink }) => (
1010
<>
1111
<Title addClass='mb-2' size='large' title='Featured Services' />
12-
<Row xs={1} sm={2} className={`g-5 mb-5 ${orientation === 'vertical' && 'row-cols-md-3'}`}>
12+
<Row xs={1} sm={2} className={`g-5 mb-5 ${orientation === 'vertical' && 'row-cols-md-3'}`} data-cy='item-group'>
1313
{isLoading
1414
? (
1515
<>

src/compounds/TitledTextBox/TitledTextBox.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ import PropTypes from 'prop-types'
33
import { TextBox, Title } from '../../components'
44
import './titled-text-box.css'
55

6-
const TitledTextBox = ({ text, textAlignment, textSize, textStyle, title, titleAlignment, titleSize, titleStyle }) => (
7-
<section className='titled-text-box'>
6+
const TitledTextBox = ({ dataCy, text, textAlignment, textSize, textStyle, title, titleAlignment, titleSize, titleStyle }) => (
7+
<section className='titled-text-box' data-cy={dataCy}>
88
<Title addClass='mb-2' alignment={titleAlignment} size={titleSize} style={titleStyle} title={title} />
99
<TextBox alignment={textAlignment} size={textSize} style={textStyle} text={text} />
1010
</section>
1111
)
1212

1313
TitledTextBox.propTypes = {
14+
dataCy: PropTypes.string,
1415
text: PropTypes.string.isRequired,
1516
textAlignment: PropTypes.oneOf(['left', 'center', 'right']),
1617
textSize: PropTypes.oneOf(['small', 'medium', 'large']),
@@ -22,6 +23,7 @@ TitledTextBox.propTypes = {
2223
}
2324

2425
TitledTextBox.defaultProps = {
26+
dataCy: '',
2527
textAlignment: 'left',
2628
textSize: 'medium',
2729
textStyle: {},

0 commit comments

Comments
 (0)