blob: 3756a52907a3b3d6ad1808f04de235b9dc70a8fe [file] [log] [blame]
Matteo Scandolo583234d2017-04-20 14:33:04 -07001const user = require('../test_helpers/user');
2const page = require('./keyboard.po');
3
4describe('XOS Keyboard Shortcuts', function() {
5
6 beforeEach(() => {
7 user.login();
8 });
9
10 it('should open the side panel when ? is pressed', () => {
11 page.pressKey('?');
12 expect(page.sidePanel.getAttribute('class')).toMatch('open');
13 });
14
15 it('should select the search form when f is pressed', () => {
16 page.pressKey('f');
17 expect(page.searchField.getAttribute('placeholder')).toEqual(browser.driver.switchTo().activeElement().getAttribute('placeholder'));
18 });
19});