test isogit

pull/4837/head
bunsenstraat 8 months ago
parent 143a6a9419
commit 672e211067
  1. 5
      .circleci/config.yml
  2. 1
      apps/remixdesktop/package.json
  3. 6
      apps/remixdesktop/src/plugins/isoGitPlugin.ts
  4. 4
      apps/remixdesktop/test/nighwatch.app.ts

@ -130,7 +130,7 @@ jobs:
name: "Run tests"
command: |
cd apps/remixdesktop/
yarn run build:e2e && yarn run test
yarn run build:e2e && yarn run test && yarn run test:isogit
build-remixdesktop-linux:
machine:
@ -268,6 +268,7 @@ jobs:
yarn -v
sleep 15
yarn run test
yarn run test:isogit
shell: powershell.exe
# see https://docs.digicert.com/en/software-trust-manager/ci-cd-integrations/script-integrations/github-integration-ksp.html
sign-remixdesktop-windows:
@ -507,7 +508,7 @@ jobs:
command: |
nvm use 20
cd apps/remixdesktop
yarn run test
yarn run test && yarn run test:isogit
uploadartifacts:
docker:

@ -29,6 +29,7 @@
"installRipGrepMacOXarm64": "rm -rf node_modules/@vscode/ripgrep/bin && npm_config_arch=arm64 node node_modules/@vscode/ripgrep/lib/postinstall.js",
"postinstall": "electron-builder install-app-deps",
"test": "yarn run build:e2e && nightwatch --config build-e2e/remixdesktop/test/nighwatch.app.js",
"test:isogit": "yarn run test --useIsoGit --test build-e2e/remixdesktop/test/tests/app/git.test.js",
"build:e2e": "tsc -p tsconfig.e2e.json"
},
"devDependencies": {

@ -12,7 +12,8 @@ const profile: Profile = {
displayName: 'isogit',
description: 'isogit plugin',
}
// used in e2e tests
const useIsoGit = process.argv.includes('--useIsoGit');
export class IsoGitPlugin extends ElectronBasePlugin {
clients: IsoGitPluginClient[] = []
constructor() {
@ -60,7 +61,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient {
this.gitIsInstalled = await gitProxy.version() ? true : false
})
this.workingDir = await this.call('fs' as any, 'getWorkingDir')
this.gitIsInstalled = await gitProxy.version() ? true : false
this.gitIsInstalled = await gitProxy.version() && !useIsoGit ? true : false
})
}
@ -335,6 +336,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient {
}
} else {
try {
this.call('terminal' as any, 'log', 'Cloning using builtin git... please wait.')
const clone = await git.clone({
...await this.getGitConfig(),
...cmd,

@ -2,6 +2,8 @@ const os = require('os');
const http = require('http');
const useIsoGit = process.argv.includes('--useIsoGit');
// Function to check if localhost:8080 is active
function checkLocalhost8080Active(callback) {
const options = {
@ -81,6 +83,8 @@ module.exports = {
// Check if running on CircleCI or locally
let args = process.env.CIRCLECI ? ["--e2e"] : ["--e2e-local"];
if(useIsoGit) args = [...args, '--useIsoGit'];
if(!process.env.CIRCLECI){
checkLocalhost8080Active((isActive)=>{
if(!isActive){

Loading…
Cancel
Save