forked from eclipse-edc/DataDashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: cleanup * add test on asset creation
- Loading branch information
Showing
53 changed files
with
54 additions
and
3,286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,32 @@ | ||
describe('end-to-end', () => { | ||
it('should be accessible', () => { | ||
const consumerUrl = Cypress.env('consumerUrl') | ||
const providerUrl = Cypress.env('providerUrl') | ||
const uuid = () => Cypress._.random(0, 1e6) | ||
const consumerUrl = Cypress.env('consumerUrl') | ||
const providerUrl = Cypress.env('providerUrl') | ||
|
||
it('should be accessible', () => { | ||
cy.visit(consumerUrl); | ||
|
||
cy.visit(providerUrl); | ||
}) | ||
|
||
it('should create an asset and view it on provider side', function() { | ||
cy.visit(providerUrl); | ||
|
||
const id = uuid() | ||
const name = `asset-${id}` | ||
|
||
cy.get('[href="/my-assets"]').as('assets-menu-item').click(); | ||
cy.get('#mat-input-0').as('asset-filter') | ||
cy.get('.container').contains('Create asset').as('open-new-asset-dialog').click(); | ||
cy.get('#mat-input-1').as('asset-id-field').clear(); | ||
cy.get('@asset-id-field').type(id); | ||
cy.get('#mat-input-2').as('asset-name-field').clear('ra'); | ||
cy.get('@asset-name-field').type(name); | ||
cy.get('mat-dialog-actions').click().contains('Create').as('confirm-create-asset').click(); | ||
|
||
cy.get('@asset-filter').click({force: true}).type(name); | ||
|
||
cy.get('[fxLayout="row wrap"]').as('assets-list').find('mat-card').should('have.length', 1) | ||
}); | ||
|
||
}) |
Oops, something went wrong.