Fix the test can't click input elements

Needed to scroll to the element when it's not visible in the view.
This commit is contained in:
Yuya Ochiai
2016-09-13 23:22:35 +09:00
parent d65c7b30bb
commit 8870863955

View File

@@ -65,6 +65,7 @@ describe('browser/settings.html', function() {
env.addClientCommands(this.app.client); env.addClientCommands(this.app.client);
return this.app.client return this.app.client
.loadSettingsPage() .loadSettingsPage()
.scroll('#inputHideMenuBar')
.isSelected('#inputHideMenuBar input').then((isSelected) => { .isSelected('#inputHideMenuBar input').then((isSelected) => {
if (isSelected !== v) { if (isSelected !== v) {
return this.app.client.click('#inputHideMenuBar input') return this.app.client.click('#inputHideMenuBar input')
@@ -96,6 +97,7 @@ describe('browser/settings.html', function() {
env.addClientCommands(this.app.client); env.addClientCommands(this.app.client);
return this.app.client return this.app.client
.loadSettingsPage() .loadSettingsPage()
.scroll('#inputDisableWebSecurity')
.isSelected('#inputDisableWebSecurity input').then((isSelected) => { .isSelected('#inputDisableWebSecurity input').then((isSelected) => {
if (isSelected !== v) { if (isSelected !== v) {
return this.app.client.click('#inputDisableWebSecurity input') return this.app.client.click('#inputDisableWebSecurity input')