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

@ -206,6 +206,20 @@ module.exports = {
locateStrategy: 'xpath' 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 // GROUP 2
'create a branch #group2': function (browser: NightwatchBrowser) { 'create a branch #group2': function (browser: NightwatchBrowser) {

@ -22,18 +22,23 @@ export const SourceControlItemButtons = (props: SourceControlItemButtonsProps) =
return <> return <>
{status && status.indexOf("modified") === -1 ? <></> : {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> <FontAwesomeIcon icon={faUndo} className="" /></button>
} }
{status && status.indexOf("deleted") === -1 ? <></> : {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.checkoutfile(file.filename)
await actions.add({ filepath: file.filename }) await actions.add({ filepath: file.filename })
}} className='btn btn-sm btn-secondary mr-1 '> }} className='btn btn-sm btn-secondary mr-1 '>
<FontAwesomeIcon icon={faUndo} className="" /></button> <FontAwesomeIcon icon={faUndo} className="" /></button>
} }
{status && status.indexOf("deleted") !== -1 ? <></> : {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> <FontAwesomeIcon icon={faMinus} className="" /></button>
} }

Loading…
Cancel
Save