File tree Expand file tree Collapse file tree
test/e2e/frontend/cypress/tests/applications Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -375,6 +375,65 @@ describe('FlowForge - Applications', () => {
375375 } )
376376 } )
377377
378+ it ( 'doesn\'t display the instance kebab menu for non-owner users' , ( ) => {
379+ cy . intercept (
380+ 'GET' ,
381+ '/api/*/teams/*/user' ,
382+ { role : 30 }
383+ ) . as ( 'getTeamRole' )
384+ cy . intercept (
385+ 'GET' ,
386+ '/api/*/teams/*/applications/status*' ,
387+ { count : 1 , applications : [ { id : 'some-id' , instances : [ ] , devices : [ ] } ] }
388+ ) . as ( 'getAppStatuses' )
389+ cy . intercept ( 'get' , '/api/*/applications/*/devices*' , {
390+ meta : { } ,
391+ count : 0 ,
392+ devices : [ ]
393+ } ) . as ( 'getDevices' )
394+ cy . intercept (
395+ 'GET' ,
396+ '/api/*/teams/*/applications*' ,
397+ req => req . reply ( res => {
398+ res . send ( {
399+ count : 1 ,
400+ applications : [
401+ {
402+ id : 'some-id' ,
403+ name : 'My app' ,
404+ description : 'My empty app description' ,
405+ instancesSummary : {
406+ instances : [
407+ {
408+ id : 1 ,
409+ name : 'instance-1' ,
410+ meta : {
411+ versions : {
412+ launcher : '2.3.1'
413+ } ,
414+ state : 'running'
415+ } ,
416+ url : 'https://www.google.com:123/search?q=rick+astley'
417+ }
418+ ]
419+ } ,
420+ devicesSummary : {
421+ devices : [
422+ ]
423+ }
424+ }
425+ ]
426+ } )
427+ } )
428+ ) . as ( 'getApplication' )
429+
430+ cy . visit ( '/' )
431+ cy . wait ( '@getTeamRole' )
432+ cy . wait ( '@getDevices' )
433+
434+ cy . get ( '[data-el="kebab-menu"]' ) . should ( 'not.exist' )
435+ } )
436+
378437 describe ( 'can search through' , ( ) => {
379438 it ( 'applications' , ( ) => {
380439 cy . intercept (
You can’t perform that action at this time.
0 commit comments