test disconnect

largegittest2
bunsenstraat 3 months ago
parent e41dd7a336
commit 91185e9633
  1. 15
      apps/remix-ide-e2e/src/tests/dgit_github.test.ts
  2. 2
      libs/remix-ui/git/src/components/github/devicecode.tsx

@ -207,7 +207,20 @@ module.exports = {
locateStrategy: 'xpath'
})
},
'disconnect github #group1': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('*[data-id="github-panel"]')
.click('*[data-id="github-panel"]')
.waitForElementVisible('*[data-id="disconnect-github"]')
.click('*[data-id="disconnect-github"]')
.waitForElementNotPresent('*[data-id="connected-as-bunsenstraat"]')
},
'check the FE for the disconnected auth user #group1': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('filePanel')
.waitForElementNotPresent('*[data-id="filepanel-connected-img-bunsenstraat"]')
.waitForElementVisible('*[data-id="filepanel-login-github"]')
},
'add a remote #group2': function (browser: NightwatchBrowser) {
browser
.pause(1000)

@ -106,7 +106,7 @@ export const GetDeviceCode = () => {
{
(context.gitHubUser && context.gitHubUser.isConnected) ?
<div className="pt-2">
<button className='btn btn-primary mt-1 w-100' onClick={async () => {
<button data-id='disconnect-github' className='btn btn-primary mt-1 w-100' onClick={async () => {
disconnect()
}}>Disconnect</button>
</div> : null

Loading…
Cancel
Save