Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix closing drawer in cypress tests #498

Merged
merged 3 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/jbrowse-plugin-apollo/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = defineConfig({
// Make viewport long and thin to avoid the scrollbar on the right interfere
// with the coordinates
viewportHeight: 2000,
viewportWidth: 1000,
viewportWidth: 1300,
retries: {
runMode: 2,
},
Expand Down
6 changes: 3 additions & 3 deletions packages/jbrowse-plugin-apollo/cypress/e2e/editFeature.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('Different ways of editing features', () => {
cy.deleteAssemblies()
})

it.skip('Edit feature via table editor', () => {
it('Edit feature via table editor', () => {
const assemblyName = 'space.gff3'
cy.addAssemblyFromGff(assemblyName, `test_data/${assemblyName}`)
cy.selectAssemblyToView(assemblyName)
Expand Down Expand Up @@ -81,7 +81,7 @@ describe('Different ways of editing features', () => {
})
})

it.skip('Can add gene ontology attribute', () => {
it('Can add gene ontology attribute', () => {
cy.addAssemblyFromGff('onegene.fasta.gff3', 'test_data/onegene.fasta.gff3')
cy.selectAssemblyToView('onegene.fasta.gff3')
cy.searchFeatures('gx1', 1)
Expand Down Expand Up @@ -110,7 +110,7 @@ describe('Different ways of editing features', () => {
cy.contains('td', 'Gene Ontology=GO:0044838')
})

it.only('FIXME: Can delete feature with checks', () => {
it('FIXME: Can delete feature with checks', () => {
cy.addAssemblyFromGff('stopcodon', 'test_data/cdsChecks/stopcodon.gff3')
cy.selectAssemblyToView('stopcodon')
cy.searchFeatures('gene02', 1)
Expand Down
8 changes: 7 additions & 1 deletion packages/jbrowse-plugin-apollo/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,16 @@ Cypress.Commands.add('addAssemblyFromGff', (assemblyName, fin) => {
cy.contains('AddAssemblyAndFeaturesFromFileChange')
.parent()
.should('contain', 'All operations successful')
// cy.get('button[aria-label="Close drawer"]', { timeout: 20_000 }).click()
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000)
cy.reload()
cy.get('button[aria-label="Close drawer"]', { timeout: 20_000 }).click()
// If the drawer is still open close it
cy.get('body').then(($body) => {
if ($body.find('button[aria-label="Close drawer"]').length > 0) {
cy.get('button[aria-label="Close drawer"]').click()
}
})
cy.contains('Select assembly to view', { timeout: 10_000 })
})

Expand Down
Loading