@@ -11,6 +11,9 @@ module.exports = {
1111
1212 const responses = {
1313 me : null ,
14+ tags : null ,
15+ tasks : null ,
16+ uiConfig : null ,
1417 studies : null ,
1518 templates : null ,
1619 services : null ,
@@ -23,6 +26,12 @@ module.exports = {
2326 const url = response . url ( ) ;
2427 if ( url . endsWith ( '/me' ) ) {
2528 responses . me = response . json ( ) ;
29+ } else if ( url . includes ( '/tags' ) ) {
30+ responses . tags = response . json ( ) ;
31+ } else if ( url . includes ( '/tasks' ) ) {
32+ responses . tasks = response . json ( ) ;
33+ } else if ( url . includes ( '/ui' ) ) {
34+ responses . uiConfig = response . json ( ) ;
2635 } else if ( url . includes ( 'projects?type=user' ) ) {
2736 responses . studies = response . json ( ) ;
2837 } else if ( url . includes ( 'projects?type=template' ) ) {
@@ -52,6 +61,24 @@ module.exports = {
5261 expect ( responseEnv . data [ "login" ] ) . toBe ( user ) ;
5362 } , ourTimeout ) ;
5463
64+ test ( 'Tags' , async ( ) => {
65+ const responseEnv = await responses . tags ;
66+ expect ( Array . isArray ( responseEnv . data ) ) . toBeTruthy ( ) ;
67+ } , ourTimeout ) ;
68+
69+ test ( 'Tasks' , async ( ) => {
70+ const responseEnv = await responses . tasks ;
71+ expect ( Array . isArray ( responseEnv . data ) ) . toBeTruthy ( ) ;
72+ } , ourTimeout ) ;
73+
74+ test ( 'UI Config' , async ( ) => {
75+ const responseEnv = await responses . uiConfig ;
76+ expect ( responseEnv . data [ "productName" ] ) . toBe ( "osparc" ) ;
77+ const uiConfig = responseEnv . data [ "ui" ] ;
78+ const isObject = typeof uiConfig === 'object' && ! Array . isArray ( uiConfig ) && uiConfig !== null ;
79+ expect ( isObject ) . toBeTruthy ( ) ;
80+ } , ourTimeout ) ;
81+
5582 test ( 'Studies' , async ( ) => {
5683 const responseEnv = await responses . studies ;
5784 expect ( Array . isArray ( responseEnv . data ) ) . toBeTruthy ( ) ;
0 commit comments