parent
f3069aadd2
commit
74b7c1af2f
@ -1,17 +0,0 @@ |
||||
const EventEmitter = require('events') |
||||
|
||||
class ModalFooterOKClick extends EventEmitter { |
||||
command () { |
||||
this.api.waitForElementVisible('#modal-footer-cancel').perform((client, done) => { |
||||
this.api.execute(function () { |
||||
document.querySelector('#modal-footer-cancel').click() |
||||
}, [], (result) => { |
||||
done() |
||||
this.emit('complete') |
||||
}) |
||||
}) |
||||
return this |
||||
} |
||||
} |
||||
|
||||
module.exports = ModalFooterOKClick |
@ -0,0 +1,17 @@ |
||||
const EventEmitter = require('events') |
||||
|
||||
class ModalFooterClick extends EventEmitter { |
||||
command (cssSelector) { |
||||
this.api.waitForElementVisible(cssSelector).perform((client, done) => { |
||||
this.api.execute(function () { |
||||
document.querySelector(cssSelector).click() |
||||
}, [], (result) => { |
||||
done() |
||||
this.emit('complete') |
||||
}) |
||||
}) |
||||
return this |
||||
} |
||||
} |
||||
|
||||
module.exports = ModalFooterClick |
@ -1,17 +0,0 @@ |
||||
const EventEmitter = require('events') |
||||
|
||||
class ModalFooterOKClick extends EventEmitter { |
||||
command () { |
||||
this.api.waitForElementVisible('#modal-footer-ok').perform((client, done) => { |
||||
this.api.execute(function () { |
||||
document.querySelector('#modal-footer-ok').click() |
||||
}, [], (result) => { |
||||
done() |
||||
this.emit('complete') |
||||
}) |
||||
}) |
||||
return this |
||||
} |
||||
} |
||||
|
||||
module.exports = ModalFooterOKClick |
@ -1,17 +0,0 @@ |
||||
'use strict' |
||||
var init = require('../helpers/init') |
||||
var sauce = require('./sauce') |
||||
|
||||
module.exports = { |
||||
before: function (browser, done) { |
||||
init(browser, done) |
||||
}, |
||||
'SimpleExecutionConsole': function (browser) { |
||||
browser |
||||
.waitForElementVisible('#terminalCli', 10000) |
||||
.executeScript('1+1') |
||||
.journalLastChild('2') |
||||
.end() |
||||
}, |
||||
tearDown: sauce |
||||
} |
@ -1,56 +0,0 @@ |
||||
'use strict' |
||||
const init = require('../helpers/init') |
||||
const sauce = require('./sauce') |
||||
|
||||
const testData = { |
||||
validGistId: '1859c97c6e1efc91047d725d5225888e', |
||||
invalidGistId: '6368b389f9302v32902msk2402' |
||||
} |
||||
|
||||
module.exports = { |
||||
before: function (browser, done) { |
||||
init(browser, done) |
||||
}, |
||||
'Load Gist Modal': function (browser) { |
||||
browser |
||||
.waitForElementVisible('#icon-panel', 10000) |
||||
.clickLaunchIcon('fileExplorers') |
||||
.scrollAndClick('div.file > div.btn-group > button:nth-child(1)') |
||||
.waitForElementVisible('h6.modal-title') |
||||
.assert.containsText('h6.modal-title', 'Load a Gist') |
||||
.waitForElementVisible('div.modal-body > div') |
||||
.assert.containsText('div.modal-body > div', 'Enter the ID of the Gist or URL you would like to load.') |
||||
.waitForElementVisible('#prompt_text') |
||||
.click('#modal-footer-cancel') |
||||
}, |
||||
|
||||
'Display Error Message For Invalid Gist ID': function (browser) { |
||||
browser |
||||
.waitForElementVisible('#icon-panel', 10000) |
||||
.clickLaunchIcon('fileExplorers') |
||||
.scrollAndClick('div.file > div.btn-group > button:nth-child(1)') |
||||
.waitForElementVisible('#prompt_text') |
||||
.setValue('#prompt_text', testData.invalidGistId) |
||||
.modalFooterOKClick() |
||||
.waitForElementVisible('div.modal-body > div') |
||||
.assert.containsText('div.modal-body > div', 'Gist load error: Not Found') |
||||
.modalFooterOKClick() |
||||
}, |
||||
|
||||
'Import From Gist For Valid Gist ID': function (browser) { |
||||
browser |
||||
.waitForElementVisible('#icon-panel', 10000) |
||||
.clickLaunchIcon('fileExplorers') |
||||
.scrollAndClick('div.file > div.btn-group > button:nth-child(1)') |
||||
.waitForElementVisible('#prompt_text') |
||||
.setValue('#prompt_text', testData.validGistId) |
||||
.modalFooterOKClick() |
||||
.switchFile(`browser/gists/${testData.validGistId}`) |
||||
.switchFile(`browser/gists/${testData.validGistId}/ApplicationRegistry`) |
||||
.waitForElementVisible(`div[title='browser/gists/${testData.validGistId}/ApplicationRegistry']`) |
||||
.assert.containsText(`div[title='browser/gists/${testData.validGistId}/ApplicationRegistry'] > span`, 'ApplicationRegistry') |
||||
.end() |
||||
}, |
||||
|
||||
tearDown: sauce |
||||
} |
@ -0,0 +1,17 @@ |
||||
'use strict' |
||||
var init = require('../helpers/init') |
||||
var sauce = require('./sauce') |
||||
|
||||
module.exports = { |
||||
before: function (browser, done) { |
||||
init(browser, done) |
||||
}, |
||||
'SimpleExecutionConsole': function (browser) { |
||||
browser |
||||
.waitForElementVisible('#terminalCli', 10000) |
||||
.executeScript('1+1') |
||||
.journalLastChild('2') |
||||
.end() |
||||
}, |
||||
tearDown: sauce |
||||
} |
Loading…
Reference in new issue