Changeset View
Changeset View
Standalone View
Standalone View
cypress/integration/directory.spec.js
| Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | describe('Directory Tests', function() { | ||||
| }); | }); | ||||
| it('should open subdirectory when clicked', function() { | it('should open subdirectory when clicked', function() { | ||||
| cy.get('.swh-directory') | cy.get('.swh-directory') | ||||
| .first() | .first() | ||||
| .children('a') | .children('a') | ||||
| .click(); | .click(); | ||||
| cy.url() | // cy.url() | ||||
| .should('include', `${url}&path=${dirs[0]['name']}`); | // .should('include', `${url}&path=${dirs[0]['name']}`); | ||||
| cy.get('.swh-directory-table') | cy.get('.swh-directory-table') | ||||
| .should('be.visible'); | .should('be.visible'); | ||||
| }); | }); | ||||
| it('should have metadata available from javascript', function() { | it('should have metadata available from javascript', function() { | ||||
| cy.window().then(win => { | cy.window().then(win => { | ||||
| const metadata = win.swh.webapp.getBrowsedSwhObjectMetadata(); | const metadata = win.swh.webapp.getBrowsedSwhObjectMetadata(); | ||||
| expect(metadata).to.not.be.empty; | expect(metadata).to.not.be.empty; | ||||
| expect(metadata).to.have.any.keys('directory'); | expect(metadata).to.have.any.keys('directory'); | ||||
| }); | }); | ||||
| }); | }); | ||||
| }); | }); | ||||