Add class to searchbar for automated tests

This commit is contained in:
BryceLTaylor 2020-10-23 14:00:11 -04:00
parent 37d279f6e5
commit 0cd1f6e6be
2 changed files with 2 additions and 1 deletions

View file

@ -135,6 +135,7 @@ class Navigation extends React.Component {
/>
<Input
aria-label={this.props.intl.formatMessage({id: 'general.search'})}
className="search-input"
name="q"
placeholder={this.props.intl.formatMessage({id: 'general.search'})}
type="text"

View file

@ -83,7 +83,7 @@ describe('www-integration navbar links', () => {
});
test('Search Bar', async () => {
let searchBar = await findByXpath('//input[@id="frc-q-1088"]');
let searchBar = await findByXpath('//div[contains(@class, "search-input")]/div/input');
await searchBar.sendKeys('cat');
await driver.sleep(500); // without it sends an empty string on submit
await searchBar.submit();