commands test

pull/4791/head
Your Name 6 months ago
parent 21b3e732ef
commit 36a16b812a
  1. 37
      apps/remix-ide-e2e/src/tests/dgit_github.test.ts
  2. 3
      libs/remix-ui/git/src/components/panels/commands/pushpull.tsx

@ -79,9 +79,26 @@ module.exports = {
.clickLaunchIcon('filePanel')
.waitForElementVisible('*[data-id="treeViewLitreeViewItemREADME.md"]')
},
'check the remotes #group1': function (browser: NightwatchBrowser) {
'check the commands panel #group1': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('dgit')
.click('*[data-id="commands-panel"]')
.waitForElementVisible({
selector: "//div[@id='commands-remote-branch-select']//div[contains(@class, 'singleValue') and contains(text(), 'master')]",
locateStrategy: 'xpath'
})
.waitForElementVisible({
selector: "//div[@id='commands-remote-origin-select']//div[contains(@class, 'singleValue') and contains(text(), 'origin')]",
locateStrategy: 'xpath'
})
.waitForElementVisible({
selector: "//div[@id='commands-local-branch-select']//div[contains(@class, 'singleValue') and contains(text(), 'master')]",
locateStrategy: 'xpath'
})
},
'check the remotes #group1': function (browser: NightwatchBrowser) {
browser
.click('*[data-id="remotes-panel"]')
.waitForElementVisible('*[data-id="remotes-panel-content"]')
.click({
@ -143,7 +160,7 @@ module.exports = {
'check the local commits #group1': function (browser: NightwatchBrowser) {
browser
.click('*[data-id="commits-panel"]')
.pause()
.pause(1000)
.waitForElementVisible({
selector: '//*[@data-id="commits-current-branch-links"]//*[@data-id="commit-summary-linking fixed-"]',
locateStrategy: 'xpath'
@ -156,5 +173,21 @@ module.exports = {
selector: '//*[@data-id="commits-current-branch-links"]//*[@data-id="commit-change-modified-README.md"]',
locateStrategy: 'xpath'
})
},
'check the commands panel for links #group1': function (browser: NightwatchBrowser) {
browser
.click('*[data-id="commands-panel"]')
.waitForElementVisible({
selector: "//div[@id='commands-remote-branch-select']//div[contains(@class, 'singleValue') and contains(text(), 'links')]",
locateStrategy: 'xpath'
})
.waitForElementVisible({
selector: "//div[@id='commands-remote-origin-select']//div[contains(@class, 'singleValue') and contains(text(), 'origin')]",
locateStrategy: 'xpath'
})
.waitForElementVisible({
selector: "//div[@id='commands-local-branch-select']//div[contains(@class, 'singleValue') and contains(text(), 'links')]",
locateStrategy: 'xpath'
})
}
}

@ -135,6 +135,7 @@ export const PushPull = () => {
<label>Local Branch</label>
<Select
id='commands-local-branch-select'
options={localBranchOptions}
isDisabled={context.branches.length === 0}
onChange={(e: any) => e && onLocalBranchChange(e.value)}
@ -147,6 +148,7 @@ export const PushPull = () => {
<label>Remote Branch</label>
<Select
id='commands-remote-branch-select'
options={remoteBranchOptions}
isDisabled={context.branches.length === 0}
onChange={(e: any) => e && onRemoteBranchChange(e.value)}
@ -159,6 +161,7 @@ export const PushPull = () => {
<label>Remote</label>
<Select
id='commands-remote-origin-select'
options={localRemotesOptions}
isDisabled={context.remotes.length === 0}
onChange={(e: any) => e && onRemoteChange(e.value)}

Loading…
Cancel
Save