Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
05108478
Commit
05108478
authored
Aug 18, 2021
by
yann300
Committed by
davidzagi93@gmail.com
Sep 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create solidity web app
parent
a67b30a2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
58 deletions
+30
-58
solidityUnittests.spec.ts
apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts
+0
-57
compile-tab-styles.js
apps/remix-ide/src/app/tabs/styles/compile-tab-styles.js
+1
-1
index.ts
libs/remix-ui/solidity-compiler/src/index.ts
+1
-0
icompiler-api.ts
libs/remix-ui/solidity-compiler/src/lib/icompiler-api.ts
+28
-0
No files found.
apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts
View file @
05108478
...
@@ -158,8 +158,6 @@ module.exports = {
...
@@ -158,8 +158,6 @@ module.exports = {
.
waitForElementVisible
(
'*[data-id="modalDialogCustomPromptTextCreate"]'
)
.
waitForElementVisible
(
'*[data-id="modalDialogCustomPromptTextCreate"]'
)
// eslint-disable-next-line dot-notation
// eslint-disable-next-line dot-notation
.
execute
(
function
()
{
document
.
querySelector
(
'*[data-id="modalDialogCustomPromptTextCreate"]'
)[
'value'
]
=
'workspace_new'
})
.
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="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok'
)
.
click
(
'*[data-id="workspacesSelect"] option[value="workspace_new"]'
)
.
click
(
'*[data-id="workspacesSelect"] option[value="workspace_new"]'
)
// end of creating
// end of creating
...
@@ -186,33 +184,6 @@ module.exports = {
...
@@ -186,33 +184,6 @@ module.exports = {
.
waitForElementContainsText
(
'#solidityUnittestsOutput'
,
'✓ Check winnin proposal with return value'
,
60000
)
.
waitForElementContainsText
(
'#solidityUnittestsOutput'
,
'✓ Check winnin proposal with return value'
,
60000
)
},
},
<<<<<<<
HEAD
<<<<<<<
HEAD
=======
'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'
)
},
>>>>>>>
348
f2d6ab
(
e2e
tests
for
hh
logs
in
SUT
plugin
)
'Debug failed test using debugger'
:
function
(
browser
:
NightwatchBrowser
)
{
'Debug failed test using debugger'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfilePanel"]'
)
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfilePanel"]'
)
...
@@ -244,9 +215,6 @@ module.exports = {
...
@@ -244,9 +215,6 @@ module.exports = {
},
},
'Basic Solidity Unit tests with local compiler'
:
function
(
browser
:
NightwatchBrowser
)
{
'Basic Solidity Unit tests with local compiler'
:
function
(
browser
:
NightwatchBrowser
)
{
=======
'Solidity Unit tests Basic Basic with local compiler'
:
function
(
browser
:
NightwatchBrowser
)
{
>>>>>>>
8
da004312
(
reset
solidityUnitTest
.
spec
)
browser
browser
.
clickLaunchIcon
(
'solidity'
)
.
clickLaunchIcon
(
'solidity'
)
.
setSolidityCompilerVersion
(
'builtin'
)
.
setSolidityCompilerVersion
(
'builtin'
)
...
@@ -492,31 +460,6 @@ const sources = [
...
@@ -492,31 +460,6 @@ const sources = [
return ballotToTest.winningProposal() == 0;
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");
}
}`
}
}
}
}
]
]
...
...
apps/remix-ide/src/app/tabs/styles/compile-tab-styles.js
View file @
05108478
const
csjs
=
require
(
'csjs-inject'
)
var
csjs
=
require
(
'csjs-inject'
)
const
css
=
csjs
`
const
css
=
csjs
`
.compilerTabView {
.compilerTabView {
...
...
libs/remix-ui/solidity-compiler/src/index.ts
View file @
05108478
export
*
from
'./lib/solidity-compiler'
export
*
from
'./lib/solidity-compiler'
export
*
from
'./lib/logic'
export
*
from
'./lib/logic'
export
*
from
'./lib/icompiler-api'
libs/remix-ui/solidity-compiler/src/lib/icompiler-api.ts
0 → 100644
View file @
05108478
export
type
onCurrentFileChanged
=
(
fileName
:
string
)
=>
void
export
interface
ICompilerApi
{
contractMap
:
{
file
:
string
}
|
Record
<
string
,
any
>
compileErrors
:
any
currentFile
:
string
configurationSettings
:
any
setHardHatCompilation
(
value
:
boolean
):
void
setSelectedVersion
(
version
:
string
):
void
getCompilationResult
():
any
setCompilerConfig
:
(
settings
:
any
)
=>
void
getParameters
:
()
=>
any
setParameters
:
(
params
)
=>
void
getConfiguration
:
(
name
:
string
)
=>
string
setConfiguration
:
(
name
:
string
,
value
:
string
)
=>
void
fileProviderOf
:
(
file
:
string
)
=>
string
getFileManagerMode
:
()
=>
string
fileExists
:
(
file
:
string
)
=>
Promise
<
boolean
>
writeFile
:
(
file
:
string
,
content
:
string
)
=>
Promise
<
void
>
readFile
:
(
file
:
string
)
=>
Promise
<
string
>
open
:
(
file
:
string
)
=>
void
addExternalFile
:
(
file
:
string
,
content
:
string
)
=>
void
onCurrentFileChanged
:
(
listener
:
onCurrentFileChanged
)
=>
void
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment