remixd_terminal: resolving conflicts

pull/1342/head
davidzagi93@gmail.com 3 years ago
commit 4357ef2fe4
  1. 4
      .env
  2. 1
      apps/remix-ide-e2e/src/tests/libraryDeployment.test.ts
  3. 50
      apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts
  4. 2
      apps/remix-ide/src/app/files/fileManager.js
  5. 2
      apps/remix-ide/src/app/tabs/compile-tab.js
  6. 1
      libs/remix-lib/src/index.ts
  7. 3
      libs/remix-lib/src/types/ICompilerApi.ts
  8. 2
      libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx
  9. 1
      libs/remix-ui/solidity-compiler/src/lib/types/index.ts
  10. 7
      libs/remix-ui/terminal/src/lib/reducers/terminalReducer.ts
  11. 6
      nx.json
  12. 4
      tsconfig.base.json
  13. 3
      tsconfig.json
  14. 0
      {

@ -1,4 +0,0 @@
gist_token=<token>
account_passphrase=<passphrase>
account_password=<password>
NODE_OPTIONS=--max-old-space-size=2048

@ -77,6 +77,7 @@ function checkDeployShouldFail (browser: NightwatchBrowser, callback: VoidFuncti
.clickLaunchIcon('udapp')
.selectContract('test') // deploy lib
.createContract('')
.pause(60000)
.getText('div[class^="terminal"]', (value) => {
console.log('value: ', value)
})

@ -158,6 +158,8 @@ module.exports = {
.waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]')
// eslint-disable-next-line dot-notation
.execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_new' })
.pause(5000)
.waitForElementPresent('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok')
.click('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok')
.click('*[data-id="workspacesSelect"] option[value="workspace_new"]')
// end of creating
@ -184,6 +186,29 @@ module.exports = {
.waitForElementContainsText('#solidityUnittestsOutput', '✓ Check winnin proposal with return value', 60000)
},
'Solidity Unit tests with hardhat console log': function (browser: NightwatchBrowser) {
browser
.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
.addFile('tests/hhLogs_test.sol', sources[0]['tests/hhLogs_test.sol'])
.clickLaunchIcon('solidityUnitTesting')
.waitForElementVisible('*[id="singleTesttests/4_Ballot_test.sol"]', 60000)
.click('*[id="singleTesttests/4_Ballot_test.sol"]')
.click('#runTestsTabRunAction')
.pause(2000)
.waitForElementVisible('*[data-id="testTabSolidityUnitTestsOutputheader"]', 120000)
.waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]', 60000)
.waitForElementContainsText('#solidityUnittestsOutput', 'tests/hhLogs_test.sol', 60000)
.assert.containsText('#journal > div:nth-child(2) > span ', 'Before all:')
.assert.containsText('#journal > div:nth-child(2) > span', 'Inside beforeAll')
.assert.containsText('#journal > div:nth-child(3) > span', 'Check sender:')
.assert.containsText('#journal > div:nth-child(3) > span', 'msg.sender is 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4')
.assert.containsText('#journal > div:nth-child(4) > span', 'Check int logs:')
.assert.containsText('#journal > div:nth-child(4) > span', '10 20')
.assert.containsText('#journal > div:nth-child(4) > span', 'Number is 25')
.openFile('tests/hhLogs_test.sol')
.removeFile('tests/hhLogs_test.sol', 'workspace_new')
},
'Debug failed test using debugger': function (browser: NightwatchBrowser) {
browser
.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
@ -460,6 +485,31 @@ const sources = [
return ballotToTest.winningProposal() == 0;
}
}`
},
'tests/hhLogs_test.sol': {
content: `// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "hardhat/console.sol";
contract hhLogs {
function beforeAll () public {
console.log('Inside beforeAll');
}
function checkSender () public {
console.log('msg.sender is %s', msg.sender);
Assert.ok(true, "should be true");
}
function checkIntLogs () public {
console.log(10,20);
console.log('Number is %d', 25);
Assert.ok(true, "should be true");
}
}`
}
}
]

@ -22,7 +22,7 @@ const profile = {
icon: 'assets/img/fileManager.webp',
permission: true,
version: packageJson.version,
methods: ['closeAllFiles', 'closeFile', 'file', 'exists', 'open', 'writeFile', 'readFile', 'copyFile', 'copyDir', 'rename', 'mkdir', 'readdir', 'remove', 'getCurrentFile', 'getFile', 'getFolder', 'setFile', 'switchFile', 'refresh', 'getProviderOf', 'getProviderByName', 'getPathFromUrl', 'getUrlFromPath'],
methods: ['closeAllFiles', 'closeFile', 'file', 'exists', 'open', 'writeFile', 'readFile', 'copyFile', 'copyDir', 'rename', 'mkdir', 'readdir', 'remove', 'getCurrentFile', 'getFile', 'getFolder', 'setFile', 'switchFile', 'refresh', 'getProviderOf', 'getProviderByName', 'getPathFromUrl', 'getUrlFromPath', 'saveCurrentFile'],
kind: 'file-system'
}
const errorMsg = {

@ -139,7 +139,7 @@ class CompileTab extends CompilerApiMixin(ViewPlugin) { // implements ICompilerA
}
getAppParameter (name) {
// first look in the URL params then in the local storPage
// first look in the URL params then in the local storage
const params = this.queryParams.get()
const param = params[name] ? params[name] : this.config.get(name)
if (param === 'true') return true

@ -18,7 +18,6 @@ import * as typeConversion from './execution/typeConversion'
import { TxRunnerVM } from './execution/txRunnerVM'
import { TxRunnerWeb3 } from './execution/txRunnerWeb3'
import * as txResultHelper from './helpers/txResultHelper'
export { ICompilerApi, ConfigurationSettings } from './types/ICompilerApi'
const helpers = {

@ -50,5 +50,8 @@ export interface ConfigurationSettings {
language: string,
optimize: boolean,
runs: string
<<<<<<< HEAD
=======
>>>>>>> 0e36c001f098047cf4fec47ae9611d1e4e4a8355
}

@ -5,7 +5,7 @@ import { Toaster } from '@remix-ui/toaster'
import { IframePlugin, WebsocketPlugin } from '@remixproject/engine-web'
import { localPluginReducerActionType, localPluginToastReducer } from '../reducers/pluginManagerReducer'
import { FormStateProps, PluginManagerComponent } from '../../types'
import { canActivate, FormStateProps, PluginManagerComponent } from '../../types'
interface LocalPluginFormProps {
closeModal: () => void

@ -23,5 +23,4 @@ export interface ContractSelectionProps {
} | Record<string, any>,
modal: (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => void,
contractsDetails: Record<string, any>
}

@ -139,9 +139,12 @@ export const remixWelcomeTextReducer = (state, action) => {
}
export const registerScriptRunnerReducer = (state, action) => {
const result = Object.assign([], action.payload.message)
console.log({ result })
switch (action.type) {
case 'html':
return {
...state,
journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, style: 'text-log' })
}
case 'log':
return {
...state,

@ -122,6 +122,12 @@
"tags": []
},
"remix-ui-terminal": {
<<<<<<< HEAD
=======
"tags": []
},
"solidity-compiler": {
>>>>>>> 0e36c001f098047cf4fec47ae9611d1e4e4a8355
"tags": []
},
"solidity-compiler": {

@ -43,9 +43,9 @@
"@remix-project/core-plugin": ["libs/remix-core-plugin/src/index.ts"],
"@remix-ui/solidity-compiler": ["libs/remix-ui/solidity-compiler/src/index.ts"],
"@remix-ui/publish-to-storage": ["libs/remix-ui/publish-to-storage/src/index.ts"],
"@remix-ui/plugin-manager": ["libs/remix-ui/plugin-manager/src/index.ts"],
"@remix-ui/renderer": ["libs/remix-ui/renderer/src/index.ts"],
"@remix-ui/terminal": ["libs/remix-ui/terminal/src/index.ts"]
"@remix-ui/terminal": ["libs/remix-ui/terminal/src/index.ts"],
"@remix-ui/plugin-manager": ["libs/remix-ui/plugin-manager/src/index.ts"],
}
},
"exclude": ["node_modules", "tmp"]

@ -14,8 +14,7 @@
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"baseUrl": ".",
"paths": {},
"allowSyntheticDefaultImports": true
"paths": {}
},
"exclude": ["node_modules", "tmp"]
}

Loading…
Cancel
Save