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
1e03b6d1
Unverified
Commit
1e03b6d1
authored
Apr 22, 2020
by
yann300
Committed by
GitHub
Apr 22, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2760 from ethereum/plugin-e2e
Test for plugin reload after webpage refresh
parents
5738f5b7
f59ff833
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
getInstalledPlugins.js
test-browser/commands/getInstalledPlugins.js
+27
-0
pluginManager.js
test-browser/tests/pluginManager.js
+17
-0
No files found.
test-browser/commands/getInstalledPlugins.js
0 → 100644
View file @
1e03b6d1
const
EventEmitter
=
require
(
'events'
)
class
GetInstalledPlugins
extends
EventEmitter
{
command
(
cb
)
{
const
browser
=
this
.
api
browser
.
waitForElementPresent
(
'[plugin]:not([plugin=""]'
)
.
perform
((
done
)
=>
{
browser
.
execute
(()
=>
{
const
pluginNames
=
[]
const
plugins
=
document
.
querySelectorAll
(
'[plugin]:not([plugin=""]'
)
plugins
.
forEach
(
plugin
=>
{
pluginNames
.
push
(
plugin
.
getAttribute
(
'plugin'
))
})
return
pluginNames
},
[],
(
result
)
=>
{
done
()
cb
(
result
.
value
)
this
.
emit
(
'complete'
)
})
})
return
this
}
}
module
.
exports
=
GetInstalledPlugins
test-browser/tests/pluginManager.js
View file @
1e03b6d1
...
@@ -127,6 +127,23 @@ module.exports = {
...
@@ -127,6 +127,23 @@ module.exports = {
.
waitForElementVisible
(
'*[data-shared="tooltipPopup"]:nth-last-of-type(1)'
)
.
waitForElementVisible
(
'*[data-shared="tooltipPopup"]:nth-last-of-type(1)'
)
.
pause
(
2000
)
.
pause
(
2000
)
.
assert
.
containsText
(
'*[data-shared="tooltipPopup"]:nth-last-of-type(1)'
,
'Cannot create Plugin : This name has already been used'
)
.
assert
.
containsText
(
'*[data-shared="tooltipPopup"]:nth-last-of-type(1)'
,
'Cannot create Plugin : This name has already been used'
)
},
'Should load back installed plugins after reload'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'*[data-id="pluginManagerComponentPluginManager"]'
)
.
getInstalledPlugins
((
plugins
)
=>
{
browser
.
refresh
()
.
waitForElementVisible
(
'*[data-id="remixIdeSidePanel"]'
)
.
pause
(
3000
)
.
perform
((
done
)
=>
{
plugins
.
forEach
(
plugin
=>
{
if
(
plugin
!==
testData
.
pluginName
)
{
browser
.
waitForElementVisible
(
`[plugin="
${
plugin
}
"`
)
}
})
done
()
})
})
.
end
()
.
end
()
},
},
tearDown
:
sauce
tearDown
:
sauce
...
...
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