pull/4791/head
Your Name 5 months ago
parent ef2014c3e6
commit 870c260a40
  1. 16
      apps/remix-ide-e2e/src/tests/dgit_local.test.ts
  2. 11
      libs/remix-ui/git/src/components/panels/sourcecontrol/sourcontrolitembuttons.tsx

@ -173,7 +173,7 @@ module.exports = {
.clickLaunchIcon('filePanel')
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtest2.txt"]')
},
// group 3
'rename a file #group3': function (browser: NightwatchBrowser) {
browser
@ -206,6 +206,20 @@ module.exports = {
locateStrategy: 'xpath'
})
},
'undo the rename #group3': function (browser: NightwatchBrowser) {
browser
.click('*[data-id="unDoStagedtest.txt"]')
.waitForElementNotPresent({
selector: "//*[@data-file='/test.txt']",
locateStrategy: 'xpath'
})
},
'check if file is returned #group3': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('filePanel')
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtest.txt"]')
},
// GROUP 2
'create a branch #group2': function (browser: NightwatchBrowser) {

@ -22,18 +22,23 @@ export const SourceControlItemButtons = (props: SourceControlItemButtonsProps) =
return <>
{status && status.indexOf("modified") === -1 ? <></> :
<button onClick={async () => await actions.checkoutfile(file.filename)} className='btn btn-sm btn-secondary mr-1 '>
<button
data-id={`unDo${group.name}${path.basename(file.filename)}`}
onClick={async () => await actions.checkoutfile(file.filename)} className='btn btn-sm btn-secondary mr-1 '>
<FontAwesomeIcon icon={faUndo} className="" /></button>
}
{status && status.indexOf("deleted") === -1 ? <></> :
<button onClick={async () => {
<button
data-id={`unDo${group.name}${path.basename(file.filename)}`}
onClick={async () => {
await actions.checkoutfile(file.filename)
await actions.add({ filepath: file.filename })
}} className='btn btn-sm btn-secondary mr-1 '>
<FontAwesomeIcon icon={faUndo} className="" /></button>
}
{status && status.indexOf("deleted") !== -1 ? <></> :
<button data-id={`unStage${group.name}${path.basename(file.filename)}`} onClick={async () => await actions.rm({ filepath: file.filename })} className='btn btn-sm btn-secondary mr-1 '>
<button data-id={`unStage${group.name}${path.basename(file.filename)}`}
onClick={async () => await actions.rm({ filepath: file.filename })} className='btn btn-sm btn-secondary mr-1 '>
<FontAwesomeIcon icon={faMinus} className="" /></button>
}

Loading…
Cancel
Save