pull/5026/head
bunsenstraat 4 months ago committed by Aniket
parent c7442da3e9
commit cfc023f656
  1. 8
      apps/remix-ide-e2e/src/tests/dgit_github.test.ts
  2. 3
      libs/remix-ui/git/src/components/panels/branches.tsx

@ -136,22 +136,22 @@ module.exports = {
}, },
'switch to branch links #group1': function (browser: NightwatchBrowser) { 'switch to branch links #group1': function (browser: NightwatchBrowser) {
browser browser
.click('*[data-id="branches-panel"]')
.waitForElementVisible({ .waitForElementVisible({
selector: '//*[@data-id="remotes-panel-content"]//*[@data-id="branches-branch-links"]', selector: '//*[@data-id="branches-panel-content-remote-branches"]//*[@data-id="branches-branch-links"]',
locateStrategy: 'xpath' locateStrategy: 'xpath'
}) })
.click({ .click({
selector: '//*[@data-id="remotes-panel-content"]//*[@data-id="branches-toggle-branch-links"]', selector: '//*[@data-id="branches-panel-content-remote-branches"]//*[@data-id="branches-toggle-branch-links"]',
locateStrategy: 'xpath' locateStrategy: 'xpath'
}) })
.waitForElementVisible({ .waitForElementVisible({
selector: '//*[@data-id="remotes-panel-content"]//*[@data-id="branches-toggle-current-branch-links"]', selector: '//*[@data-id="branches-panel-content-remote-branches"]//*[@data-id="branches-toggle-current-branch-links"]',
locateStrategy: 'xpath' locateStrategy: 'xpath'
}) })
}, },
'check the local branches #group1': function (browser: NightwatchBrowser) { 'check the local branches #group1': function (browser: NightwatchBrowser) {
browser browser
.click('*[data-id="branches-panel"]')
.waitForElementVisible({ .waitForElementVisible({
selector: '//*[@data-id="branches-panel-content"]//*[@data-id="branches-toggle-current-branch-links"]', selector: '//*[@data-id="branches-panel-content"]//*[@data-id="branches-toggle-current-branch-links"]',
locateStrategy: 'xpath' locateStrategy: 'xpath'

@ -32,6 +32,7 @@ export const Branches = () => {
<hr /> <hr />
{context.upstream ? {context.upstream ?
<> <>
<div data-id='branches-panel-content-remote-branches'>
<label className="text-uppercase">remote branches on {context.upstream ? context.upstream.name : null}</label> <label className="text-uppercase">remote branches on {context.upstream ? context.upstream.name : null}</label>
{context.branches && context.branches.filter((branch, index) => branch.remote && branch.remote.name === context.upstream.name).map((branch, index) => { {context.branches && context.branches.filter((branch, index) => branch.remote && branch.remote.name === context.upstream.name).map((branch, index) => {
return ( return (
@ -43,7 +44,7 @@ export const Branches = () => {
remote: context.upstream remote: context.upstream
}) })
}}><FontAwesomeIcon icon={faSync} ></FontAwesomeIcon><label className="pl-1">Fetch more from remote</label></GitUIButton> }}><FontAwesomeIcon icon={faSync} ></FontAwesomeIcon><label className="pl-1">Fetch more from remote</label></GitUIButton>
<hr /></> : null} <hr /></div></> : null}
</div> : null} </div> : null}
{context.currentBranch {context.currentBranch

Loading…
Cancel
Save