Skip to content
14 changes: 7 additions & 7 deletions cypress/e2e/importStructure.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ describe('Import Structure', () => {

// Verify collection and reaction appear in tree
cy.get('[data-rct-tree="assignmentTree"]')
.contains('Test Collection')
.contains('3D')
.should('be.visible')
.parent()
.find('button')
.first()
.click()

cy.get('[data-rct-tree="assignmentTree"]')
.contains('Test Reaction')
.contains('CHI-R41')
.should('be.visible')
})

Expand All @@ -46,22 +46,22 @@ describe('Import Structure', () => {

// Expand to reaction
cy.get('[data-rct-tree="assignmentTree"]')
.contains('Test Collection')
.contains('3D')
.parent()
.find('button')
.first()
.click()

cy.get('[data-rct-tree="assignmentTree"]')
.contains('Test Reaction')
.contains('CHI-R41')
.parent()
.find('button')
.first()
.click()

// Verify samples are nested under reaction
cy.get('[data-rct-tree="assignmentTree"]').within(() => {
cy.contains('Product Sample').should('exist')
cy.contains('reactant').should('exist')
})
})

Expand Down Expand Up @@ -110,15 +110,15 @@ describe('Import Structure', () => {

// Verify data appears in the tree (which confirms it was saved to IndexedDB)
cy.get('[data-rct-tree="assignmentTree"]')
.contains('Test Collection')
.contains('3D')
.should('be.visible')
.parent()
.find('button')
.first()
.click()

cy.get('[data-rct-tree="assignmentTree"]')
.contains('Test Reaction')
.contains('CHI-R41')
.should('be.visible')
})
})
Expand Down
Loading