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" name: "Run tests"
command: | command: |
cd apps/remixdesktop/ cd apps/remixdesktop/
yarn run build:e2e && yarn run test yarn run build:e2e && yarn run test && yarn run test:isogit
build-remixdesktop-linux: build-remixdesktop-linux:
machine: machine:
@ -268,6 +268,7 @@ jobs:
yarn -v yarn -v
sleep 15 sleep 15
yarn run test yarn run test
yarn run test:isogit
shell: powershell.exe shell: powershell.exe
# see https://docs.digicert.com/en/software-trust-manager/ci-cd-integrations/script-integrations/github-integration-ksp.html # see https://docs.digicert.com/en/software-trust-manager/ci-cd-integrations/script-integrations/github-integration-ksp.html
sign-remixdesktop-windows: sign-remixdesktop-windows:
@ -507,7 +508,7 @@ jobs:
command: | command: |
nvm use 20 nvm use 20
cd apps/remixdesktop cd apps/remixdesktop
yarn run test yarn run test && yarn run test:isogit
uploadartifacts: uploadartifacts:
docker: 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", "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", "postinstall": "electron-builder install-app-deps",
"test": "yarn run build:e2e && nightwatch --config build-e2e/remixdesktop/test/nighwatch.app.js", "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" "build:e2e": "tsc -p tsconfig.e2e.json"
}, },
"devDependencies": { "devDependencies": {

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

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

Loading…
Cancel
Save