Skip to content

Commit

Permalink
Temporarily remove tests for chart on doi container
Browse files Browse the repository at this point in the history
Raising issue #95 to track
  • Loading branch information
richardhallett committed Aug 20, 2020
1 parent 0b53c6f commit 9ed9a48
Showing 1 changed file with 29 additions and 30 deletions.
59 changes: 29 additions & 30 deletions cypress/integration/doiContainer.test.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
describe("DoiContainer", () => {
describe('DoiContainer', () => {
before(() => {
cy.visit(`/doi.org/${encodeURIComponent('10.4224/crm.2012e.cass-5')}`)
})

it("visit 10.4224/crm.2012e.cass-5", () => {
it('visit 10.4224/crm.2012e.cass-5', () => {
cy.get('h3.work', { timeout: 10000 })
.contains('CASS-5: Nearshore seawater reference material for trace metals')
.contains(
'CASS-5: Nearshore seawater reference material for trace metals'
)
.should('be.visible')
})

it("license", () => {
cy.get('.license', { timeout: 30000 })
.should('be.visible')
it('license', () => {
cy.get('.license', { timeout: 30000 }).should('be.visible')
})

it("export box", () => {
it('export box', () => {
cy.get('div#export-xml', { timeout: 30000 })
// timeout for the query results to return
.contains('DataCite XML')
.should('be.visible')
})

it("share", () => {
it('share', () => {
cy.get('.share-button', { timeout: 30000 }).should(($btn) => {
expect($btn).to.have.length(3)
expect($btn.eq(0)).to.be.visible
Expand All @@ -30,34 +31,32 @@ describe("DoiContainer", () => {
})
})

it("cite as", () => {
it('cite as', () => {
cy.get('select.cite-as')
.select('ieee')
// timeout for the query results to return
.get('.formatted-citation', { timeout: 30000 })
.should('be.visible')
//.contains('CXC-DS, “Chandra X-ray Observatory ObsId 1.”')
//.contains('CXC-DS, “Chandra X-ray Observatory ObsId 1.”')
})

it("chart", () => {
cy.get('.mark-rect > path')
.should('be.visible')
.should('have.length', 1)
})
//TODO: Redo when data is available
// it("chart", () => {
// cy.get('.mark-rect > path')
// .should('be.visible')
// .should('have.length', 1)
// })
})


describe("DoiContainer with usage", () => {
before(() => {
cy.visit(`/doi.org/${encodeURIComponent('10.70048/findable101')}`)
})

it("chart", () => {
cy.get('.mark-rect > path', { timeout: 10000 })
.should('be.visible')
.should('have.length', 4)
})
})



//TODO: Redo when data is available
// describe("DoiContainer with usage", () => {
// before(() => {
// cy.visit(`/doi.org/${encodeURIComponent('10.70048/findable101')}`)
// })

// it("chart", () => {
// cy.get('.mark-rect > path', { timeout: 10000 })
// .should('be.visible')
// .should('have.length', 4)
// })
// })

0 comments on commit 9ed9a48

Please sign in to comment.