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
44a736af
Commit
44a736af
authored
Feb 10, 2021
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include negative test for missing gist token
parent
aea6b63f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
gist.test.ts
apps/remix-ide-e2e/src/tests/gist.test.ts
+23
-4
No files found.
apps/remix-ide-e2e/src/tests/gist.test.ts
View file @
44a736af
...
...
@@ -74,10 +74,6 @@ module.exports = {
.
modalFooterCancelClick
()
},
'Display Error Message For Missing Gist Token'
:
function
(
browser
:
NightwatchBrowser
)
{
},
'Display Error Message For Invalid Gist ID'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
waitForElementVisible
(
'*[data-id="remixIdeIconPanel"]'
,
10000
)
...
...
@@ -91,9 +87,32 @@ module.exports = {
.
modalFooterOKClick
()
},
'Display Error Message For Missing Gist Token When Publishing'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
waitForElementVisible
(
'*[data-id="remixIdeIconPanel"]'
,
10000
)
.
clickLaunchIcon
(
'settings'
)
.
waitForElementVisible
(
'[data-id="settingsTabRemoveGistToken"]'
)
.
click
(
'[data-id="settingsTabRemoveGistToken"]'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
waitForElementVisible
(
'*[data-id="fileExplorerNewFilepublishToGist"]'
)
.
click
(
'*[data-id="fileExplorerNewFilepublishToGist"]'
)
.
waitForElementVisible
(
'*[data-id="browserModalDialogContainer-react"]'
)
.
pause
(
2000
)
.
click
(
'.modal-ok'
)
.
pause
(
10000
)
.
getText
(
'[data-id="browserModalDialogModalBody-react"]'
,
(
result
)
=>
{
browser
.
assert
.
ok
(
result
.
value
===
'Remix requires an access token (which includes gists creation permission). Please go to the settings tab to create one.'
,
'Assert failed. Gist token error message not displayed.'
)
})
.
click
(
'[data-id="browser-modal-footer-cancel-react"]'
)
},
'Import From Gist For Valid Gist ID'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
waitForElementVisible
(
'*[data-id="remixIdeIconPanel"]'
,
10000
)
.
clickLaunchIcon
(
'settings'
)
.
click
(
'*[data-id="settingsTabGenerateContractMetadataLabel"]'
)
.
setValue
(
'[data-id="settingsTabGistAccessToken"]'
,
process
.
env
.
gist_token
)
.
click
(
'[data-id="settingsTabSaveGistToken"]'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
scrollAndClick
(
'*[data-id="landingPageImportFromGistButton"]'
)
.
waitForElementVisible
(
'*[data-id="modalDialogCustomPromptText"]'
)
...
...
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