pull/3097/head
filip mertens 2 years ago committed by Aniket
parent d9d8e58056
commit efbb68d799
  1. 29
      apps/remix-ide-e2e/src/tests/workspace_git.test.ts

@ -8,7 +8,31 @@ module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
init(browser, done) init(browser, done)
}, },
'Should add credentials': function (browser: NightwatchBrowser) { 'Should not be able to create GIT without credentials #group1': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('filePanel')
.click('*[data-id="workspaceCreate"]')
.waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]')
.waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] > button')
.waitForElementVisible({
selector: "//*[@class='text-warning' and contains(.,'You need to set a username')]",
locateStrategy: 'xpath'
})
.waitForElementPresent({
selector: '//*[@data-id="initGitRepository"][@disabled]',
locateStrategy: 'xpath'
})
.execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_blank' })
.click('select[id="wstemplate"]')
.click('select[id="wstemplate"] option[value=blank]')
.click('[data-id="initGitRepositoryLabel"]')
.waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok')
.execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() })
.pause(100)
.waitForElementNotPresent('*[data-id="treeViewLitreeViewItem.git"]')
.waitForElementNotVisible('[data-id="workspaceGitPanel"]')
},
'Should add credentials #group1 #group2 #group3': function (browser: NightwatchBrowser) {
browser browser
.clickLaunchIcon('settings') .clickLaunchIcon('settings')
.setValue('[data-id="settingsTabGithubUsername"]', 'circleci') .setValue('[data-id="settingsTabGithubUsername"]', 'circleci')
@ -35,6 +59,9 @@ module.exports = {
.waitForElementContainsText('[data-id="workspaceGitBranchesDropdown"]', 'main') .waitForElementContainsText('[data-id="workspaceGitBranchesDropdown"]', 'main')
}, },
// CLONE REPOSITORY E2E START // CLONE REPOSITORY E2E START
'Should clone a repository #group2': function (browser: NightwatchBrowser) { 'Should clone a repository #group2': function (browser: NightwatchBrowser) {

Loading…
Cancel
Save