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
0537013e
Commit
0537013e
authored
Jan 15, 2021
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix remixd tests
parent
914ea80d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
25 deletions
+36
-25
removeFile.ts
apps/remix-ide-e2e/src/commands/removeFile.ts
+11
-5
fileExplorer.test.ts
apps/remix-ide-e2e/src/tests/fileExplorer.test.ts
+4
-4
gist.test.ts
apps/remix-ide-e2e/src/tests/gist.test.ts
+3
-3
file-explorer.tsx
libs/remix-ui/file-explorer/src/lib/file-explorer.tsx
+11
-8
remix-ui-modal-dialog.tsx
libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx
+6
-5
index.ts
libs/remix-ui/modal-dialog/src/lib/types/index.ts
+1
-0
No files found.
apps/remix-ide-e2e/src/commands/removeFile.ts
View file @
0537013e
...
...
@@ -34,13 +34,19 @@ function removeFile (browser: NightwatchBrowser, path: string, done: VoidFunctio
contextMenuClick
(
document
.
querySelector
(
'[data-path="'
+
path
+
'"]'
))
},
[
path
],
function
()
{
browser
.
waitForElementVisible
(
'#menuitemdelete'
,
2000
)
.
waitForElementVisible
(
'#menuitemdelete'
)
.
click
(
'#menuitemdelete'
)
.
pause
(
500
)
.
waitForElementVisible
(
'#modal-footer-ok'
,
2000
)
.
click
(
'#modal-footer-ok'
)
.
waitForElementNotPresent
(
'[data-path="'
+
path
+
'"]'
)
.
pause
(
2000
)
.
perform
(()
=>
{
if
(
path
.
indexOf
(
'browser'
)
!==
-
1
)
{
browser
.
waitForElementVisible
(
'[data-id="browser-modal-footer-ok-react"]'
)
.
click
(
'[data-id="browser-modal-footer-ok-react"]'
)
.
waitForElementNotPresent
(
'[data-path="'
+
path
+
'"]'
)
}
else
if
(
path
.
indexOf
(
'localhost'
)
!==
-
1
)
{
browser
.
waitForElementVisible
(
'[data-id="localhost-modal-footer-ok-react"]'
)
.
click
(
'[data-id="localhost-modal-footer-ok-react"]'
)
.
waitForElementNotPresent
(
'[data-path="'
+
path
+
'"]'
)
}
done
()
})
})
...
...
apps/remix-ide-e2e/src/tests/fileExplorer.test.ts
View file @
0537013e
...
...
@@ -39,7 +39,7 @@ module.exports = {
.
waitForElementVisible
(
'*[data-id="treeViewLitreeViewItembrowser/5_Renamed_Contract.sol"]'
)
.
rightClick
(
'[data-path="browser/5_Renamed_Contract.sol"]'
)
.
click
(
'*[id="menuitemdelete"]'
)
.
waitForElementVisible
(
'*[data-id="
m
odalDialogContainer-react"]'
)
.
waitForElementVisible
(
'*[data-id="
browserM
odalDialogContainer-react"]'
)
.
pause
(
2000
)
.
click
(
'.modal-ok'
)
.
waitForElementNotPresent
(
'*[data-id="treeViewLitreeViewItembrowser/5_Renamed_Contract.sol"'
)
...
...
@@ -67,7 +67,7 @@ module.exports = {
.
waitForElementVisible
(
'*[data-id="treeViewLitreeViewItembrowser/Browser_E2E_Tests"]'
)
.
rightClick
(
'[data-path="browser/Browser_E2E_Tests"]'
)
.
click
(
'*[id="menuitemdelete"]'
)
.
waitForElementVisible
(
'*[data-id="
m
odalDialogContainer-react"]'
)
.
waitForElementVisible
(
'*[data-id="
browserM
odalDialogContainer-react"]'
)
.
pause
(
2000
)
.
click
(
'.modal-ok'
)
.
waitForElementNotPresent
(
'*[data-id="treeViewLitreeViewItembrowser/Browser_E2E_Tests"]'
)
...
...
@@ -80,11 +80,11 @@ module.exports = {
.
pause
(
10000
)
.
waitForElementVisible
(
'*[data-id="fileExplorerNewFilepublishToGist"]'
)
.
click
(
'*[data-id="fileExplorerNewFilepublishToGist"]'
)
.
waitForElementVisible
(
'*[data-id="
m
odalDialogContainer-react"]'
)
.
waitForElementVisible
(
'*[data-id="
browserM
odalDialogContainer-react"]'
)
.
pause
(
2000
)
.
click
(
'.modal-ok'
)
.
pause
(
2000
)
.
waitForElementVisible
(
'*[data-id="
m
odalDialogContainer-react"]'
)
.
waitForElementVisible
(
'*[data-id="
browserM
odalDialogContainer-react"]'
)
.
pause
(
2000
)
.
click
(
'.modal-ok'
)
.
pause
(
2000
)
...
...
apps/remix-ide-e2e/src/tests/gist.test.ts
View file @
0537013e
...
...
@@ -34,11 +34,11 @@ module.exports = {
.
waitForElementVisible
(
'*[data-id="treeViewLitreeViewItembrowser/Browser_Tests"]'
)
.
addFile
(
'File.sol'
,
{
content
:
''
},
false
)
.
click
(
'*[data-id="fileExplorerNewFilepublishToGist"]'
)
.
waitForElementVisible
(
'*[data-id="
m
odalDialogContainer-react"]'
)
.
waitForElementVisible
(
'*[data-id="
browserM
odalDialogContainer-react"]'
)
.
pause
(
2000
)
.
click
(
'.modal-ok'
)
.
pause
(
10000
)
.
getText
(
'[data-id="
m
odalDialogModalBody-react"]'
,
(
result
)
=>
{
.
getText
(
'[data-id="
browserM
odalDialogModalBody-react"]'
,
(
result
)
=>
{
console
.
log
(
result
)
const
value
=
typeof
result
.
value
===
'string'
?
result
.
value
:
null
const
reg
=
/gist.github.com
\/([^
.
]
+
)
/
...
...
@@ -50,7 +50,7 @@ module.exports = {
}
else
{
const
gistid
=
id
[
1
]
browser
.
click
(
'[data-id="
modal-footer-cancel
-react"]'
)
.
click
(
'[data-id="
browser-modal-footer-ok
-react"]'
)
.
executeScript
(
`remix.loadgist('
${
gistid
}
')`
)
.
perform
((
done
)
=>
{
if
(
runtimeBrowser
===
'chrome'
)
{
browser
.
openFile
(
'browser/gists'
)
}
done
()
})
.
waitForElementVisible
(
`[data-id="treeViewLitreeViewItembrowser/gists/
${
gistid
}
"]`
)
...
...
libs/remix-ui/file-explorer/src/lib/file-explorer.tsx
View file @
0537013e
...
...
@@ -903,14 +903,17 @@ export const FileExplorer = (props: FileExplorerProps) => {
</
div
>
</
TreeViewItem
>
</
TreeView
>
<
ModalDialog
title=
{
state
.
modalOptions
.
title
}
message=
{
state
.
modalOptions
.
message
}
hide=
{
state
.
modalOptions
.
hide
}
ok=
{
state
.
modalOptions
.
ok
}
cancel=
{
state
.
modalOptions
.
cancel
}
handleHide=
{
handleHideModal
}
/>
{
props
.
name
&&
<
ModalDialog
id=
{
props
.
name
}
title=
{
state
.
modalOptions
.
title
}
message=
{
state
.
modalOptions
.
message
}
hide=
{
state
.
modalOptions
.
hide
}
ok=
{
state
.
modalOptions
.
ok
}
cancel=
{
state
.
modalOptions
.
cancel
}
handleHide=
{
handleHideModal
}
/>
}
<
Toaster
message=
{
state
.
toasterMsg
}
/>
</
div
>
)
...
...
libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx
View file @
0537013e
...
...
@@ -42,7 +42,7 @@ export const ModalDialog = (props: ModalDialogProps) => {
return
(
<
div
data
-
id=
"modalDialogContainer-react"
data
-
id=
{
`${props.id}ModalDialogContainer-react`
}
data
-
backdrop=
"static"
data
-
keyboard=
"false"
className=
'modal'
...
...
@@ -61,7 +61,7 @@ export const ModalDialog = (props: ModalDialogProps) => {
onKeyDown=
{
({
keyCode
})
=>
{
modalKeyEvent
(
keyCode
)
}
}
>
<
div
className=
"modal-header"
>
<
h6
className=
"modal-title"
data
-
id=
"modalDialogModalTitle-react"
>
<
h6
className=
"modal-title"
data
-
id=
{
`${props.id}ModalDialogModalTitle-react`
}
>
{
props
.
title
&&
props
.
title
}
</
h6
>
{
!
props
.
showCancelIcon
&&
...
...
@@ -70,13 +70,14 @@ export const ModalDialog = (props: ModalDialogProps) => {
</
span
>
}
</
div
>
<
div
className=
"modal-body text-break remixModalBody"
data
-
id=
"modalDialogModalBody-react"
>
<
div
className=
"modal-body text-break remixModalBody"
data
-
id=
{
`${props.id}ModalDialogModalBody-react`
}
>
{
props
.
children
?
props
.
children
:
props
.
message
}
</
div
>
<
div
className=
"modal-footer"
data
-
id=
"modalDialogModalFooter-react"
>
<
div
className=
"modal-footer"
data
-
id=
{
`${props.id}ModalDialogModalFooter-react`
}
>
{
/* todo add autofocus ^^ */
}
{
props
.
ok
&&
<
span
data
-
id=
{
`${props.id}-modal-footer-ok-react`
}
className=
{
'modal-ok btn btn-sm '
+
(
state
.
toggleBtn
?
'btn-dark'
:
'btn-light'
)
}
onClick=
{
()
=>
{
if
(
props
.
ok
.
fn
)
props
.
ok
.
fn
()
...
...
@@ -88,7 +89,7 @@ export const ModalDialog = (props: ModalDialogProps) => {
}
{
props
.
cancel
&&
<
span
data
-
id=
'modal-footer-cancel-react'
data
-
id=
{
`${props.id}-modal-footer-cancel-react`
}
className=
{
'modal-cancel btn btn-sm '
+
(
state
.
toggleBtn
?
'btn-light'
:
'btn-dark'
)
}
data
-
dismiss=
"modal"
onClick=
{
()
=>
{
...
...
libs/remix-ui/modal-dialog/src/lib/types/index.ts
View file @
0537013e
export
interface
ModalDialogProps
{
id
?:
string
title
?:
string
,
message
?:
string
,
ok
?:
{
label
:
string
,
fn
:
()
=>
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