@@ -12,12 +12,21 @@ const testData = {
1212 pluginUrl : 'https://zokrates.github.io/zokrates-remix-plugin/'
1313}
1414
15+ const localPluginData = {
16+ name : testData . pluginName ,
17+ displayName : testData . pluginDisplayName ,
18+ canActivate : [ ] ,
19+ url : testData . pluginUrl ,
20+ location : 'sidePanel'
21+ }
22+
1523module . exports = {
24+ '@disabled' : true ,
1625 before : function ( browser : NightwatchBrowser , done : VoidFunction ) {
1726 init ( browser , done , 'http://127.0.0.1:8080' , false )
1827 } ,
1928
20- 'Should Load Plugin Manager' : function ( browser : NightwatchBrowser ) {
29+ 'Should Load Plugin Manager #group1 ' : function ( browser : NightwatchBrowser ) {
2130 browser . waitForElementVisible ( '*[data-id="remixIdeSidePanel"]' )
2231 . pause ( 3000 )
2332 . click ( '*[plugin="pluginManager"]' )
@@ -26,7 +35,7 @@ module.exports = {
2635 . assert . containsText ( '*[data-id="sidePanelSwapitTitle"]' , 'PLUGIN MANAGER' )
2736 } ,
2837
29- 'Should Search for plugins' : function ( browser : NightwatchBrowser ) {
38+ 'Should Search for plugins #group1 ' : function ( browser : NightwatchBrowser ) {
3039 browser . waitForElementVisible ( '*[data-id="pluginManagerComponentPluginManager"]' )
3140 . click ( '*[data-id="pluginManagerComponentSearchInput"]' )
3241 . keys ( 'debugger' )
@@ -45,7 +54,7 @@ module.exports = {
4554 . keys ( browser . Keys . BACK_SPACE )
4655 } ,
4756
48- 'Should activate plugins' : function ( browser : NightwatchBrowser ) {
57+ 'Should activate plugins #group1 ' : function ( browser : NightwatchBrowser ) {
4958 browser . waitForElementVisible ( '*[data-id="pluginManagerComponentPluginManager"]' )
5059 . click ( '*[data-id="pluginManagerComponentPluginManager"]' )
5160 . scrollAndClick ( '*[data-id="pluginManagerComponentActivateButtondebugger"]' )
@@ -57,7 +66,7 @@ module.exports = {
5766 . waitForElementVisible ( '*[data-id="pluginManagerComponentDeactivateButtonZoKrates"]' , 60000 )
5867 } ,
5968
60- 'Should deactivate plugins' : function ( browser : NightwatchBrowser ) {
69+ 'Should deactivate plugins #group1 ' : function ( browser : NightwatchBrowser ) {
6170 browser . waitForElementVisible ( '*[data-id="pluginManagerComponentPluginManager"]' )
6271 . click ( '*[data-id="pluginManagerComponentPluginManager"]' )
6372 . waitForElementVisible ( '*[data-id="pluginManagerComponentDeactivateButtondebugger"]' , 60000 )
@@ -69,45 +78,23 @@ module.exports = {
6978 . waitForElementVisible ( '*[data-id="pluginManagerComponentActivateButtonvyper"]' , 60000 )
7079 } ,
7180
72- 'Should connect a local plugin' : function ( browser : NightwatchBrowser ) {
73- browser . waitForElementVisible ( '*[data-id="pluginManagerComponentPluginManager"]' )
74- . execute ( function ( ) {
75- window . testmode = true
76- } )
77- . click ( '*[data-id="pluginManagerComponentPluginSearchButton"]' )
78- . waitForElementVisible ( '*[data-id="pluginManagerLocalPluginModalDialogModalDialogContainer-react"]' )
79- . click ( '*[data-id="pluginManagerLocalPluginModalDialogModalDialogModalBody-react"]' )
80- . waitForElementVisible ( '*[data-id="localPluginName"]' )
81- . clearValue ( '*[data-id="localPluginName"]' ) . setValue ( '*[data-id="localPluginName"]' , testData . pluginName )
82- . clearValue ( '*[data-id="localPluginDisplayName"]' ) . setValue ( '*[data-id="localPluginDisplayName"]' , testData . pluginDisplayName )
83- . clearValue ( '*[data-id="localPluginUrl"]' ) . setValue ( '*[data-id="localPluginUrl"]' , testData . pluginUrl )
84- . click ( '*[data-id="localPluginRadioButtoniframe"]' )
85- . click ( '*[data-id="localPluginRadioButtonsidePanel"]' )
86- . click ( '*[data-id="pluginManagerLocalPluginModalDialogModalDialogModalFooter-react"]' )
87- . click ( '*[data-id="pluginManagerLocalPluginModalDialog-modal-footer-ok-react' )
81+ 'Should connect a local plugin #group2' : function ( browser : NightwatchBrowser ) {
82+ browser . waitForElementVisible ( '*[data-id="remixIdeSidePanel"]' )
83+ . pause ( 3000 )
84+ . click ( '*[plugin="pluginManager"]' )
85+ . clickLaunchIcon ( 'filePanel' )
86+ . addLocalPlugin ( localPluginData , false )
87+ . pause ( 2000 )
8888 } ,
8989
90- 'Should display error message for creating already existing plugin' : function ( browser : NightwatchBrowser ) {
90+ 'Should display error message for creating already existing plugin #group2 ' : function ( browser : NightwatchBrowser ) {
9191 browser . waitForElementVisible ( '*[data-id="pluginManagerComponentPluginManager"]' )
92- . click ( '*[data-id="pluginManagerComponentPluginSearchButton"]' )
93- . waitForElementVisible ( '*[data-id="pluginManagerLocalPluginModalDialogModalDialogContainer-react"]' )
94- . click ( '*[data-id="pluginManagerLocalPluginModalDialogModalDialogModalBody-react"]' )
95- . waitForElementVisible ( '*[data-id="localPluginName"]' )
96- . clearValue ( '*[data-id="localPluginName"]' ) . setValue ( '*[data-id="localPluginName"]' , testData . pluginName )
97- . clearValue ( '*[data-id="localPluginDisplayName"]' ) . setValue ( '*[data-id="localPluginDisplayName"]' , testData . pluginDisplayName )
98- . clearValue ( '*[data-id="localPluginUrl"]' ) . setValue ( '*[data-id="localPluginUrl"]' , testData . pluginUrl )
99- . click ( '*[data-id="localPluginRadioButtoniframe"]' )
100- . click ( '*[data-id="localPluginRadioButtonsidePanel"]' )
101- . waitForElementVisible ( '*[data-id="pluginManagerLocalPluginModalDialog-modal-footer-ok-react"]' , 60000 )
102- . click ( '*[data-id="pluginManagerLocalPluginModalDialog-modal-footer-ok-react"]' )
103- // .modalFooterOKClick()
104- // .pause(2000)
105- . waitForElementVisible ( '*[data-shared="tooltipPopup"]' , 60000 )
106- . pause ( 5000 )
107- . assert . containsText ( '*[data-shared="tooltipPopup"]' , 'Cannot create Plugin : This name has already been used' )
92+ . clickLaunchIcon ( 'filePanel' )
93+ . addLocalPlugin ( localPluginData , false )
94+ . waitForElementContainsText ( '*[data-shared="tooltipPopup"]' , 'Cannot create Plugin : This name has already been used' )
10895 } ,
10996
110- 'Should load back installed plugins after reload' : function ( browser : NightwatchBrowser ) {
97+ 'Should load back installed plugins after reload #group2 ' : function ( browser : NightwatchBrowser ) {
11198 browser
11299 . waitForElementVisible ( '*[data-id="remixIdeSidePanel"]' , 3000 )
113100 . waitForElementVisible ( '*[data-id="pluginManagerComponentPluginManager"]' )
@@ -124,6 +111,5 @@ module.exports = {
124111 done ( )
125112 } )
126113 } )
127- . end ( )
128114 }
129115}
0 commit comments