Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 39 additions & 33 deletions cypress/support/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ export const init_config = {
'domePublish': 'https://knowledgebase.dome-marketplace.org/shelves/company-onboarding-process',
'purchaseEnabled': false,
'defaultId': 'urn:ngsi-ld:catalog:32828e1d-4652-4f4c-b13e-327450ce83c6',
"theme": "DOME"

'theme': 'DOME',
'roles': {
'seller': 'Seller',
'customer': 'Buyer',
'admin': 'admin',
'orgAdmin': 'orgAdmin',
'certifier': 'certifier'
}
}

export const init_stat = {"_id":"677ff8d160055e7a1e2544ff","services":["Service test 1"],"organizations":["org test 1"],"__v":0}
Expand Down Expand Up @@ -270,41 +276,41 @@ export const checkHeaderPostLogin = () => {

export const loginAcc = () => {
checkHeaderPreLogin()
local_items.expire = moment().unix() + 100
cy.window().then((window) => window.localStorage.setItem('login_items', JSON.stringify(local_items)))
local_items.expire = moment().unix() + 100
cy.window().then((window) => window.localStorage.setItem('login_items', JSON.stringify(local_items)))

// Mocks
cy.intercept(
{
method: 'GET',
url: 'http://proxy.docker:8004/logintoken'
},
(req) => {
req.reply({
statusCode: 200,
body: login_token()
});
}
).as('login_token');
// Mocks
cy.intercept(
{
method: 'GET',
url: 'http://proxy.docker:8004/logintoken'
},
(req) => {
req.reply({
statusCode: 200,
body: login_token()
});
}
).as('login_token');

cy.visit('/dashboard?token=test', {onBeforeLoad(win) {
win.document.documentElement.classList.add('dark');
}})
cy.visit('/dashboard?token=test', {onBeforeLoad(win) {
win.document.documentElement.classList.add('dark');
}})

cy.wait('@stats')
cy.get('@stats.all').should('have.length', 2)
cy.wait('@config')
cy.get('@config.all').should('have.length', 2)
//cy.wait('@productOffering')
//cy.get('@productOffering.all').should('have.length', 2)
cy.wait('@catalog')
cy.get('@catalog.all').should('have.length', 2)
cy.wait('@category')
cy.get('@category.all').should('have.length', 2)
cy.wait('@login_token')
cy.get('@login_token.all').should('have.length', 1)
cy.wait('@stats')
cy.get('@stats.all').should('have.length', 2)
cy.wait('@config')
cy.get('@config.all').should('have.length', 2)
//cy.wait('@productOffering')
//cy.get('@productOffering.all').should('have.length', 2)
cy.wait('@catalog')
cy.get('@catalog.all').should('have.length', 2)
cy.wait('@category')
cy.get('@category.all').should('have.length', 2)
cy.wait('@login_token')
cy.get('@login_token.all').should('have.length', 1)

checkHeaderPostLogin()
checkHeaderPostLogin()
}

export const productOffering = {
Expand Down
2 changes: 1 addition & 1 deletion src/app/offerings/featured/featured.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="flex flex-col w-full h-full bg-secondary-50 dark:bg-secondary-100 rounded-lg dark:border-secondary-100 border-secondary-50 border">

<div class="flex-1 h-full bg-cover bg-right-bottom bg-opacity-25 rounded-lg" style="background-image: url(assets/logos/dome-logo-element-colour.png)">
<div class="flex-1 h-full px-5 py-5 bg-secondary-50/95 dark:bg-secondary-100/95 rounded-lg">
<div data-cy="categoryItem" class="flex-1 h-full px-5 py-5 bg-secondary-50/95 dark:bg-secondary-100/95 rounded-lg">
<a class="cursor-pointer">
<h5 class="text-xl font-semibold line-clamp-2 tracking-tight text-primary-100 dark:text-white text-wrap break-words">{{cat.name}}</h5>
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/dashboard/dashboard.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div data-cy="mainText">
<h1 class="mb-4 text-left text-4xl font-extrabold tracking-tight md:text-5xl lg:text-6xl text-secondary-50">{{ 'DASHBOARD._header' | translate }}</h1>
<p class="text-left mb-8 text-lg font-normal lg:text-xl text-secondary-50">{{ 'DASHBOARD._subheader' | translate }}</p>
<button data-cy="browseServices" id="browseServices" (click)="goTo('/search')"
<button data-cy="browseServicesDashboard" id="browseServices" (click)="goTo('/search')"
class="inline-flex justify-left items-center border border-1 border-white py-3 px-5 text-base font-medium text-center text-white rounded-lg hover:bg-primary-50 ">
<svg class=" mr-2 w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
{{ 'DASHBOARD._browse_serv' | translate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2 [id]="'accordion-heading-'+idx">
</div>
</div>
} @else {
<bae-category-item [data]="category" [isParent]="true" [isFirst]="$first" [isLast]="$last"></bae-category-item>
<bae-category-item data-cy="categoryItemService" [data]="category" [isParent]="true" [isFirst]="$first" [isLast]="$last"></bae-category-item>
}
}
</h2>
Expand Down
Loading