Skip to content

Commit b0ba740

Browse files
Fix cypress importFeatures command broken by dialog restructuring
The last commit merged two DialogContent sections into one, which broke two selectors in the importFeatures command: - The Select dropdown click now uses [role="button"] instead of finding an input and clicking its parent (which matched 3 inputs after the merge) - The delete-features checkbox now uses cy.contains('label', ...) to unambiguously scope to the FormControlLabel element, and updates the label text from "Yes, delete existing features" to "Delete existing features" to match the new UI Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fd7a761 commit b0ba740

File tree

1 file changed

+9
-15
lines changed
  • packages/jbrowse-plugin-apollo/cypress/support

1 file changed

+9
-15
lines changed

packages/jbrowse-plugin-apollo/cypress/support/commands.ts

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -280,25 +280,19 @@ Cypress.Commands.add(
280280
cy.get('input[type="file"]').selectFile(gffFile)
281281
})
282282

283-
cy.contains('Select assembly')
284-
.parent()
285-
.within(() => {
286-
cy.get('input').parent().click()
287-
})
283+
cy.get('[role="button"]').click()
288284
})
289285
cy.contains('li', assemblyName, { timeout: 10_000 }).click()
290286

291287
if (deleteExistingFeatures !== undefined) {
292-
cy.contains('Yes, delete existing features')
293-
.parent()
294-
.within(() => {
295-
if (deleteExistingFeatures) {
296-
cy.get('input[type="checkbox"]').click()
297-
cy.get('input[type="checkbox"]').should('be.checked')
298-
} else {
299-
cy.get('input[type="checkbox"]').should('be.not.checked')
300-
}
301-
})
288+
cy.contains('label', 'Delete existing features').within(() => {
289+
if (deleteExistingFeatures) {
290+
cy.get('input[type="checkbox"]').click()
291+
cy.get('input[type="checkbox"]').should('be.checked')
292+
} else {
293+
cy.get('input[type="checkbox"]').should('be.not.checked')
294+
}
295+
})
302296
}
303297

304298
cy.contains('button', 'Submit').click()

0 commit comments

Comments
 (0)