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') .clickLaunchIcon('filePanel')
.waitForElementVisible('*[data-id="treeViewLitreeViewItemREADME.md"]') .waitForElementVisible('*[data-id="treeViewLitreeViewItemREADME.md"]')
}, },
'check the remotes #group1': function (browser: NightwatchBrowser) { 'check the commands panel #group1': function (browser: NightwatchBrowser) {
browser browser
.clickLaunchIcon('dgit') .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"]') .click('*[data-id="remotes-panel"]')
.waitForElementVisible('*[data-id="remotes-panel-content"]') .waitForElementVisible('*[data-id="remotes-panel-content"]')
.click({ .click({
@ -143,7 +160,7 @@ module.exports = {
'check the local commits #group1': function (browser: NightwatchBrowser) { 'check the local commits #group1': function (browser: NightwatchBrowser) {
browser browser
.click('*[data-id="commits-panel"]') .click('*[data-id="commits-panel"]')
.pause() .pause(1000)
.waitForElementVisible({ .waitForElementVisible({
selector: '//*[@data-id="commits-current-branch-links"]//*[@data-id="commit-summary-linking fixed-"]', selector: '//*[@data-id="commits-current-branch-links"]//*[@data-id="commit-summary-linking fixed-"]',
locateStrategy: 'xpath' locateStrategy: 'xpath'
@ -156,5 +173,21 @@ module.exports = {
selector: '//*[@data-id="commits-current-branch-links"]//*[@data-id="commit-change-modified-README.md"]', selector: '//*[@data-id="commits-current-branch-links"]//*[@data-id="commit-change-modified-README.md"]',
locateStrategy: 'xpath' 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> <label>Local Branch</label>
<Select <Select
id='commands-local-branch-select'
options={localBranchOptions} options={localBranchOptions}
isDisabled={context.branches.length === 0} isDisabled={context.branches.length === 0}
onChange={(e: any) => e && onLocalBranchChange(e.value)} onChange={(e: any) => e && onLocalBranchChange(e.value)}
@ -147,6 +148,7 @@ export const PushPull = () => {
<label>Remote Branch</label> <label>Remote Branch</label>
<Select <Select
id='commands-remote-branch-select'
options={remoteBranchOptions} options={remoteBranchOptions}
isDisabled={context.branches.length === 0} isDisabled={context.branches.length === 0}
onChange={(e: any) => e && onRemoteBranchChange(e.value)} onChange={(e: any) => e && onRemoteBranchChange(e.value)}
@ -159,6 +161,7 @@ export const PushPull = () => {
<label>Remote</label> <label>Remote</label>
<Select <Select
id='commands-remote-origin-select'
options={localRemotesOptions} options={localRemotesOptions}
isDisabled={context.remotes.length === 0} isDisabled={context.remotes.length === 0}
onChange={(e: any) => e && onRemoteChange(e.value)} onChange={(e: any) => e && onRemoteChange(e.value)}

Loading…
Cancel
Save