@@ -23,8 +23,14 @@ export const init_config = {
2323 'domePublish' : 'https://knowledgebase.dome-marketplace.org/shelves/company-onboarding-process' ,
2424 'purchaseEnabled' : false ,
2525 'defaultId' : 'urn:ngsi-ld:catalog:32828e1d-4652-4f4c-b13e-327450ce83c6' ,
26- "theme" : "DOME"
27-
26+ 'theme' : 'DOME' ,
27+ 'roles' : {
28+ 'seller' : 'Seller' ,
29+ 'customer' : 'Buyer' ,
30+ 'admin' : 'admin' ,
31+ 'orgAdmin' : 'orgAdmin' ,
32+ 'certifier' : 'certifier'
33+ }
2834}
2935
3036export const init_stat = { "_id" :"677ff8d160055e7a1e2544ff" , "services" :[ "Service test 1" ] , "organizations" :[ "org test 1" ] , "__v" :0 }
@@ -270,41 +276,41 @@ export const checkHeaderPostLogin = () => {
270276
271277export const loginAcc = ( ) => {
272278 checkHeaderPreLogin ( )
273- local_items . expire = moment ( ) . unix ( ) + 100
274- cy . window ( ) . then ( ( window ) => window . localStorage . setItem ( 'login_items' , JSON . stringify ( local_items ) ) )
279+ local_items . expire = moment ( ) . unix ( ) + 100
280+ cy . window ( ) . then ( ( window ) => window . localStorage . setItem ( 'login_items' , JSON . stringify ( local_items ) ) )
275281
276- // Mocks
277- cy . intercept (
278- {
279- method : 'GET' ,
280- url : 'http://proxy.docker:8004/logintoken'
281- } ,
282- ( req ) => {
283- req . reply ( {
284- statusCode : 200 ,
285- body : login_token ( )
286- } ) ;
287- }
288- ) . as ( 'login_token' ) ;
282+ // Mocks
283+ cy . intercept (
284+ {
285+ method : 'GET' ,
286+ url : 'http://proxy.docker:8004/logintoken'
287+ } ,
288+ ( req ) => {
289+ req . reply ( {
290+ statusCode : 200 ,
291+ body : login_token ( )
292+ } ) ;
293+ }
294+ ) . as ( 'login_token' ) ;
289295
290- cy . visit ( '/dashboard?token=test' , { onBeforeLoad ( win ) {
291- win . document . documentElement . classList . add ( 'dark' ) ;
292- } } )
296+ cy . visit ( '/dashboard?token=test' , { onBeforeLoad ( win ) {
297+ win . document . documentElement . classList . add ( 'dark' ) ;
298+ } } )
293299
294- cy . wait ( '@stats' )
295- cy . get ( '@stats.all' ) . should ( 'have.length' , 2 )
296- cy . wait ( '@config' )
297- cy . get ( '@config.all' ) . should ( 'have.length' , 2 )
298- //cy.wait('@productOffering')
299- //cy.get('@productOffering.all').should('have.length', 2)
300- cy . wait ( '@catalog' )
301- cy . get ( '@catalog.all' ) . should ( 'have.length' , 2 )
302- cy . wait ( '@category' )
303- cy . get ( '@category.all' ) . should ( 'have.length' , 2 )
304- cy . wait ( '@login_token' )
305- cy . get ( '@login_token.all' ) . should ( 'have.length' , 1 )
300+ cy . wait ( '@stats' )
301+ cy . get ( '@stats.all' ) . should ( 'have.length' , 2 )
302+ cy . wait ( '@config' )
303+ cy . get ( '@config.all' ) . should ( 'have.length' , 2 )
304+ //cy.wait('@productOffering')
305+ //cy.get('@productOffering.all').should('have.length', 2)
306+ cy . wait ( '@catalog' )
307+ cy . get ( '@catalog.all' ) . should ( 'have.length' , 2 )
308+ cy . wait ( '@category' )
309+ cy . get ( '@category.all' ) . should ( 'have.length' , 2 )
310+ cy . wait ( '@login_token' )
311+ cy . get ( '@login_token.all' ) . should ( 'have.length' , 1 )
306312
307- checkHeaderPostLogin ( )
313+ checkHeaderPostLogin ( )
308314}
309315
310316export const productOffering = {
0 commit comments