mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00

Squashed: 66021: Expandable search form in header 66021: Adjustment small screens 66021: search icon now pressable and css partially moved to bootstrap classes 66021: start testing of header search box; TODO fix e2e 66021: E2E Tests 66021: Header search box now with angular animation and bootstrap > css; e2e fix 66021: feedback 2019-12-19 style changes 66021: Fix navbar search tests Patch: add opacity to header search animation Change the input style 66021: expandable search navbar - tests 66021: Expandable search form in header Small fix after rebasing upstream/master
41 lines
1.0 KiB
TypeScript
41 lines
1.0 KiB
TypeScript
import { browser, element, by, protractor } from 'protractor';
|
|
import { promise } from 'selenium-webdriver';
|
|
|
|
export class ProtractorPage {
|
|
HOME = '/home';
|
|
SEARCH = '/search';
|
|
|
|
navigateToHome() {
|
|
return browser.get(this.HOME);
|
|
}
|
|
|
|
navigateToSearch() {
|
|
return browser.get(this.SEARCH);
|
|
}
|
|
|
|
getCurrentQuery(): promise.Promise<string> {
|
|
return element(by.css('#search-navbar-container form input')).getAttribute('value');
|
|
}
|
|
|
|
expandAndFocusSearchBox() {
|
|
element(by.css('#search-navbar-container form a')).click();
|
|
}
|
|
|
|
setCurrentQuery(query: string) {
|
|
element(by.css('#search-navbar-container form input[name="query"]')).sendKeys(query);
|
|
}
|
|
|
|
submitNavbarSearchForm() {
|
|
element(by.css('#search-navbar-container form .submit-icon')).click();
|
|
}
|
|
|
|
submitByPressingEnter() {
|
|
element(by.css('#search-navbar-container form input[name="query"]')).sendKeys(protractor.Key.ENTER);
|
|
}
|
|
|
|
submitByPressingEnter() {
|
|
element(by.css('#search-navbar-container form input[name="query"]')).sendKeys(protractor.Key.ENTER);
|
|
}
|
|
|
|
}
|