|
|
@ -20,9 +20,9 @@ module.exports = { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
console.log('token', process.env.gist_token) |
|
|
|
console.log('token', process.env.gist_token) |
|
|
|
browser |
|
|
|
browser |
|
|
|
.waitForElementVisible('#icon-panel', 10000) |
|
|
|
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) |
|
|
|
.clickLaunchIcon('fileExplorers') |
|
|
|
.clickLaunchIcon('fileExplorers') |
|
|
|
.click('#publishToGist') |
|
|
|
.click('*[data-id="fileExplorerNewFilepublishToGist"]') |
|
|
|
.modalFooterOKClick() |
|
|
|
.modalFooterOKClick() |
|
|
|
.getModalBody((value, done) => { |
|
|
|
.getModalBody((value, done) => { |
|
|
|
const reg = /gist.github.com\/([^.]+)/ |
|
|
|
const reg = /gist.github.com\/([^.]+)/ |
|
|
@ -44,38 +44,38 @@ module.exports = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Load Gist Modal': function (browser) { |
|
|
|
'Load Gist Modal': function (browser) { |
|
|
|
browser |
|
|
|
browser.clickLaunchIcon('home') |
|
|
|
.waitForElementVisible('#icon-panel', 10000) |
|
|
|
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) |
|
|
|
.clickLaunchIcon('fileExplorers') |
|
|
|
.clickLaunchIcon('fileExplorers') |
|
|
|
.scrollAndClick('div.file > div.btn-group > button:nth-child(1)') |
|
|
|
.scrollAndClick('*[data-id="landingPageImportFromGistButton"]') |
|
|
|
.waitForElementVisible('h6.modal-title') |
|
|
|
.waitForElementVisible('*[data-id="modalDialogModalTitle"]') |
|
|
|
.assert.containsText('h6.modal-title', 'Load a Gist') |
|
|
|
.assert.containsText('*[data-id="modalDialogModalTitle"]', 'Load a Gist') |
|
|
|
.waitForElementVisible('div.modal-body > div') |
|
|
|
.waitForElementVisible('*[data-id="modalDialogModalBody"]') |
|
|
|
.assert.containsText('div.modal-body > div', 'Enter the ID of the Gist or URL you would like to load.') |
|
|
|
.assert.containsText('*[data-id="modalDialogModalBody"]', 'Enter the ID of the Gist or URL you would like to load.') |
|
|
|
.waitForElementVisible('#prompt_text') |
|
|
|
.waitForElementVisible('*[data-id="modalDialogCustomPromptText"]') |
|
|
|
.click('#modal-footer-cancel') |
|
|
|
.modalFooterCancelClick() |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Display Error Message For Invalid Gist ID': function (browser) { |
|
|
|
'Display Error Message For Invalid Gist ID': function (browser) { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.waitForElementVisible('#icon-panel', 10000) |
|
|
|
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) |
|
|
|
.clickLaunchIcon('fileExplorers') |
|
|
|
.clickLaunchIcon('fileExplorers') |
|
|
|
.scrollAndClick('div.file > div.btn-group > button:nth-child(1)') |
|
|
|
.scrollAndClick('*[data-id="landingPageImportFromGistButton"]') |
|
|
|
.waitForElementVisible('#prompt_text') |
|
|
|
.waitForElementVisible('*[data-id="modalDialogCustomPromptText"]') |
|
|
|
.setValue('#prompt_text', testData.invalidGistId) |
|
|
|
.setValue('*[data-id="modalDialogCustomPromptText"]', testData.invalidGistId) |
|
|
|
.modalFooterOKClick() |
|
|
|
.modalFooterOKClick() |
|
|
|
.waitForElementVisible('div.modal-body > div') |
|
|
|
.waitForElementVisible('*[data-id="modalDialogModalBody"]') |
|
|
|
.assert.containsText('div.modal-body > div', 'Gist load error: Not Found') |
|
|
|
.assert.containsText('*[data-id="modalDialogModalBody"]', 'Gist load error: Not Found') |
|
|
|
.modalFooterOKClick() |
|
|
|
.modalFooterOKClick() |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Import From Gist For Valid Gist ID': function (browser) { |
|
|
|
'Import From Gist For Valid Gist ID': function (browser) { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.waitForElementVisible('#icon-panel', 10000) |
|
|
|
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) |
|
|
|
.clickLaunchIcon('fileExplorers') |
|
|
|
.clickLaunchIcon('fileExplorers') |
|
|
|
.scrollAndClick('div.file > div.btn-group > button:nth-child(1)') |
|
|
|
.scrollAndClick('*[data-id="landingPageImportFromGistButton"]') |
|
|
|
.waitForElementVisible('#prompt_text') |
|
|
|
.waitForElementVisible('*[data-id="modalDialogCustomPromptText"]') |
|
|
|
.setValue('#prompt_text', testData.validGistId) |
|
|
|
.setValue('*[data-id="modalDialogCustomPromptText"]', testData.validGistId) |
|
|
|
.modalFooterOKClick() |
|
|
|
.modalFooterOKClick() |
|
|
|
.switchFile(`browser/gists/${testData.validGistId}`) |
|
|
|
.switchFile(`browser/gists/${testData.validGistId}`) |
|
|
|
.switchFile(`browser/gists/${testData.validGistId}/ApplicationRegistry`) |
|
|
|
.switchFile(`browser/gists/${testData.validGistId}/ApplicationRegistry`) |
|
|
|