mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
run cypress tests in specific order, store and read published DID
This commit is contained in:
parent
abe3f9630f
commit
c2e2606133
1
.gitignore
vendored
1
.gitignore
vendored
@ -25,3 +25,4 @@ yarn-error.log*
|
||||
# cypress
|
||||
cypress/screenshots
|
||||
cypress/videos
|
||||
cypress/fixtures/did.txt
|
||||
|
@ -1,6 +1,3 @@
|
||||
{
|
||||
"baseUrl": "http://localhost:3000",
|
||||
"env": {
|
||||
"CONSUME_ASSET": "did:op:3fa4721ad643489bad77e0e52ecefe9b73166873faaf4661a02486b735eea0c8"
|
||||
}
|
||||
"baseUrl": "http://localhost:3000"
|
||||
}
|
||||
|
@ -64,5 +64,16 @@ context('Publish', () => {
|
||||
cy.contains('Your asset is published!', {
|
||||
timeout: 12000
|
||||
}).should('be.visible')
|
||||
|
||||
// Store DID
|
||||
cy.get('a')
|
||||
.contains('See published asset')
|
||||
.invoke('attr', 'href')
|
||||
.then(href => {
|
||||
cy.writeFile(
|
||||
'cypress/fixtures/did.txt',
|
||||
href.replace('/asset/', '')
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
@ -1,7 +1,9 @@
|
||||
/// <reference types="Cypress" />
|
||||
context('Consume', () => {
|
||||
before(() => {
|
||||
cy.visit(`/asset/${Cypress.env('CONSUME_ASSET')}`)
|
||||
cy.fixture('did').then(did => {
|
||||
cy.visit(`/asset/${did}`)
|
||||
})
|
||||
|
||||
// Alias button selector & wait for end of loading
|
||||
cy.get('button[name="Download"]', { timeout: 60000 })
|
Loading…
Reference in New Issue
Block a user