mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -05:00
Add class to searchbar for automated tests
This commit is contained in:
parent
37d279f6e5
commit
0cd1f6e6be
2 changed files with 2 additions and 1 deletions
|
@ -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"
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue