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
bd5c4521
Commit
bd5c4521
authored
Jan 14, 2021
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update gist test
parent
e84d81bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
gist.test.ts
apps/remix-ide-e2e/src/tests/gist.test.ts
+14
-10
remix-ui-modal-dialog.tsx
libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx
+1
-0
No files found.
apps/remix-ide-e2e/src/tests/gist.test.ts
View file @
bd5c4521
...
...
@@ -13,7 +13,7 @@ module.exports = {
before
:
function
(
browser
:
NightwatchBrowser
,
done
:
VoidFunction
)
{
init
(
browser
,
done
)
},
'UploadToGists'
:
function
(
browser
:
NightwatchBrowser
)
{
UploadToGists
:
function
(
browser
:
NightwatchBrowser
)
{
/*
- set the access token
- publish to gist
...
...
@@ -24,18 +24,23 @@ module.exports = {
const
runtimeBrowser
=
browser
.
options
.
desiredCapabilities
.
browserName
browser
.
refresh
()
.
pause
(
10000
)
.
waitForElementVisible
(
'*[data-id="remixIdeIconPanel"]'
,
10000
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
rightClick
(
'[data-path="browser/README.txt"]'
)
.
click
(
'*[id="menuitemcreate folder"]'
)
.
waitForElementVisible
(
'*[data-id="modalDialogContainer"]'
)
.
setValue
(
'*[data-id="modalDialogCustomPromptText"]'
,
'Browser_Tests'
)
.
modalFooterOKClick
()
.
click
(
'[data-id="fileExplorerNewFilecreateNewFolder"]'
)
.
pause
(
1000
)
.
keys
(
'Browser_Tests'
)
.
keys
(
browser
.
Keys
.
ENTER
)
.
waitForElementVisible
(
'*[data-id="treeViewLibrowser/Browser_Tests"]'
)
.
addFile
(
'File.sol'
,
{
content
:
''
})
.
click
(
'*[data-id="fileExplorerNewFilepublishToGist"]'
)
.
modalFooterOKClick
()
.
getModalBody
((
value
,
done
)
=>
{
.
waitForElementVisible
(
'*[data-id="modalDialogContainer-react"]'
)
.
pause
(
2000
)
.
click
(
'.modal-ok'
)
.
getText
(
'[data-id="modalDialogModalBody-react"]'
,
(
result
)
=>
{
console
.
log
(
result
)
const
value
=
typeof
result
.
value
===
'string'
?
result
.
value
:
null
const
reg
=
/gist.github.com
\/([^
.
]
+
)
/
const
id
=
value
.
match
(
reg
)
...
...
@@ -45,13 +50,12 @@ module.exports = {
}
else
{
const
gistid
=
id
[
1
]
browser
.
modalFooterCancelClick
(
)
.
click
(
'[data-id="modal-footer-cancel-react"]'
)
.
executeScript
(
`remix.loadgist('
${
gistid
}
')`
)
.
perform
((
done
)
=>
{
if
(
runtimeBrowser
===
'chrome'
)
{
browser
.
openFile
(
'browser/gists'
)
}
done
()
})
.
waitForElementVisible
(
`li[key="browser/gists/
${
gistid
}
"]`
)
.
click
(
`li[key="browser/gists/
${
gistid
}
"]`
)
.
openFile
(
`browser/gists/
${
gistid
}
/README.txt`
)
.
perform
(
done
)
}
})
},
...
...
libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx
View file @
bd5c4521
...
...
@@ -88,6 +88,7 @@ export const ModalDialog = (props: ModalDialogProps) => {
}
{
props
.
cancel
&&
<
span
data
-
id=
'modal-footer-cancel-react'
className=
{
'modal-cancel btn btn-sm '
+
(
state
.
toggleBtn
?
'btn-light'
:
'btn-dark'
)
}
data
-
dismiss=
"modal"
onClick=
{
()
=>
{
...
...
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