setup update

pull/1862/head
Aniket-Engg 3 years ago committed by Aniket
parent 8dc34b1e74
commit a89a527d11
  1. 16
      apps/remix-ide/src/app/tabs/test-tab.js
  2. 5
      libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx
  3. 2
      nx.json
  4. 1
      tsconfig.base.json
  5. 11
      workspace.json

@ -1,3 +1,8 @@
/* global */
import React from 'react' // eslint-disable-line
import ReactDOM from 'react-dom'
import { SolidityUnitTesting } from '@remix-ui/solidity-unit-testing' // eslint-disable-line
import { ViewPlugin } from '@remixproject/engine-web' import { ViewPlugin } from '@remixproject/engine-web'
import { removeMultipleSlashes, removeTrailingSlashes } from '../../lib/helper' import { removeMultipleSlashes, removeTrailingSlashes } from '../../lib/helper'
import { canUseWorker, urlFromVersion } from '@remix-project/remix-solidity' import { canUseWorker, urlFromVersion } from '@remix-project/remix-solidity'
@ -94,6 +99,7 @@ module.exports = class TestTab extends ViewPlugin {
await this.testRunner.init() await this.testRunner.init()
await this.createTestLibs() await this.createTestLibs()
this.updateRunAction() this.updateRunAction()
this.renderComponent()
} }
onDeactivation () { onDeactivation () {
@ -790,6 +796,16 @@ module.exports = class TestTab extends ViewPlugin {
} }
render () { render () {
return this.element
}
renderComponent () {
ReactDOM.render(
<SolidityUnitTesting api={this}/>
, this.element)
}
render2 () {
this.onActivationInternal() this.onActivationInternal()
this.testsOutput = yo`<div class="mx-3 mb-2 pb-4 border-top border-primary" hidden='true' id="solidityUnittestsOutput" data-id="testTabSolidityUnitTestsOutput"></a>` this.testsOutput = yo`<div class="mx-3 mb-2 pb-4 border-top border-primary" hidden='true' id="solidityUnittestsOutput" data-id="testTabSolidityUnitTestsOutput"></a>`
this.testsExecutionStopped = yo`<label class="text-warning h6" data-id="testTabTestsExecutionStopped">The test execution has been stopped</label>` this.testsExecutionStopped = yo`<label class="text-warning h6" data-id="testTabTestsExecutionStopped">The test execution has been stopped</label>`

@ -1,14 +1,15 @@
import './remix-ui-solidity-unit-testing.module.css'; import React, { useState } from 'react' // eslint-disable-line
/* eslint-disable-next-line */ /* eslint-disable-next-line */
export interface SolidityUnitTestingProps {} export interface SolidityUnitTestingProps {}
export const SolidityUnitTesting = (props: SolidityUnitTestingProps) => { export const SolidityUnitTesting = (props: SolidityUnitTestingProps) => {
console.log('props---->', props)
return ( return (
<div> <div>
<h1>Welcome to remix-ui-solidity-unit-testing!</h1> <h1>Welcome to remix-ui-solidity-unit-testing!</h1>
</div> </div>
); )
} }
export default SolidityUnitTesting export default SolidityUnitTesting

@ -146,7 +146,7 @@
"tags": [] "tags": []
}, },
"remix-ui-theme-module": {}, "remix-ui-theme-module": {},
"remix-ui-solidity-unit-testing": { "solidity-unit-testing": {
"tags": [] "tags": []
}, },
"remix-ui-editor-context-view": { "remix-ui-editor-context-view": {

@ -69,7 +69,6 @@
"@remix-ui/tabs": ["libs/remix-ui/tabs/src/index.ts"], "@remix-ui/tabs": ["libs/remix-ui/tabs/src/index.ts"],
"@remix-ui/helper": ["libs/remix-ui/helper/src/index.ts"], "@remix-ui/helper": ["libs/remix-ui/helper/src/index.ts"],
"@remix-ui/app": ["libs/remix-ui/app/src/index.ts"], "@remix-ui/app": ["libs/remix-ui/app/src/index.ts"],
"@remix-ui/vertical-icons-panel": ["libs/remix-ui/vertical-icons-panel/src/index.ts"], "@remix-ui/vertical-icons-panel": ["libs/remix-ui/vertical-icons-panel/src/index.ts"],
"@remix-ui/theme-module": ["libs/remix-ui/theme-module/src/index.ts"], "@remix-ui/theme-module": ["libs/remix-ui/theme-module/src/index.ts"],
"@remix-ui/editor-context-view": ["libs/remix-ui/editor-context-view/src/index.ts"], "@remix-ui/editor-context-view": ["libs/remix-ui/editor-context-view/src/index.ts"],

@ -1179,6 +1179,7 @@
"linter": "eslint", "linter": "eslint",
"tsConfig": ["libs/remix-ui/vertical-icons-panel/tsconfig.lib.json"], "tsConfig": ["libs/remix-ui/vertical-icons-panel/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/vertical-icons-panel/**/*"] "exclude": ["**/node_modules/**", "!libs/remix-ui/vertical-icons-panel/**/*"]
} }
} }
} }
@ -1189,10 +1190,13 @@
"projectType": "library", "projectType": "library",
"architect": { "architect": {
"lint": { "lint": {
"builder": "@nrwl/linter:eslint", "builder": "@nrwl/linter:lint",
"options": { "options": {
"lintFilePatterns": [ "linter": "eslint",
"libs/remix-ui/solidity-unit-testing/**/*.{ts,tsx,js,jsx}" "tsConfig": ["libs/remix-ui/solidity-unit-testing/tsconfig.lib.json"],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/solidity-unit-testing/**/*"
] ]
} }
} }
@ -1248,5 +1252,6 @@
} }
}, },
"defaultProject": "remix-ide" "defaultProject": "remix-ide"
}
} }

Loading…
Cancel
Save