@@ -44,6 +44,13 @@ module.exports = {
4444 . waitForElementVisible ( '*[data-id="connected-link-bunsenstraat"]' )
4545 . waitForElementVisible ( '*[data-id="remotes-panel"]' )
4646 } ,
47+ 'check the FE shows logged in user #group1 #group2' : function ( browser : NightwatchBrowser ) {
48+ browser
49+ . waitForElementVisible ( {
50+ selector : '//*[@data-id="github-dropdown-toggle-login"]//span[contains(text(), "bunsenstraat")]' ,
51+ locateStrategy : 'xpath'
52+ } )
53+ } ,
4754 // 'check the FE for the auth user #group1 #group2': function (browser: NightwatchBrowser) {
4855 // browser
4956 // .clickLaunchIcon('filePanel')
@@ -213,16 +220,39 @@ module.exports = {
213220 locateStrategy : 'xpath'
214221 } )
215222 } ,
216- 'disconnect github #group1' : function ( browser : NightwatchBrowser ) {
223+ 'reload page and check login persistence #group1' : function ( browser : NightwatchBrowser ) {
217224 browser
225+ . refresh ( )
226+ . pause ( 5000 ) // Wait for page to fully reload
227+ . waitForElementVisible ( '*[data-id="remixIdeIconPanel"]' , 10000 )
228+ . clickLaunchIcon ( 'dgit' )
218229 . waitForElementVisible ( '*[data-id="github-panel"]' )
219- . pause ( 1000 )
220230 . click ( '*[data-id="github-panel"]' )
231+ . waitForElementVisible ( '*[data-id="connected-as-bunsenstraat"]' )
232+ . waitForElementVisible ( '*[data-id="connected-img-bunsenstraat"]' )
233+ . waitForElementVisible ( '*[data-id="connected-link-bunsenstraat"]' )
234+ } ,
235+ 'check the FE shows logged in user after reload #group1' : function ( browser : NightwatchBrowser ) {
236+ browser
237+ . waitForElementVisible ( {
238+ selector : '//*[@data-id="github-dropdown-toggle-login"]//span[contains(text(), "bunsenstraat")]' ,
239+ locateStrategy : 'xpath'
240+ } )
241+ } ,
242+ 'disconnect github #group1' : function ( browser : NightwatchBrowser ) {
243+ browser
221244 . waitForElementVisible ( '*[data-id="disconnect-github"]' )
222245 . pause ( 1000 )
223246 . click ( '*[data-id="disconnect-github"]' )
224247 . waitForElementNotPresent ( '*[data-id="connected-as-bunsenstraat"]' )
225248 } ,
249+ 'check the FE for the disconnected auth user #group1' : function ( browser : NightwatchBrowser ) {
250+ browser
251+ . waitForElementNotPresent ( {
252+ selector : '//*[@data-id="github-dropdown-toggle-login"]//span[contains(text(), "bunsenstraat")]' ,
253+ locateStrategy : 'xpath'
254+ } )
255+ } ,
226256 // 'check the FE for the disconnected auth user #group1': function (browser: NightwatchBrowser) {
227257 // browser
228258 // .clickLaunchIcon('filePanel')
0 commit comments