-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simple tests for correct gene model and sixframe
Mostly to experiment with cypress-image-diff
- Loading branch information
Showing
9 changed files
with
95 additions
and
15 deletions.
There are no files selected for viewing
Binary file added
BIN
+10.1 KB
...pollo/cypress-image-diff-screenshots/baseline/simpleVisual.cy.ts-gene-model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+22 KB
...-apollo/cypress-image-diff-screenshots/baseline/simpleVisual.cy.ts-sixframe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.1 KB
...llo/cypress-image-diff-screenshots/comparison/simpleVisual.cy.ts-gene-model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+22 KB
...pollo/cypress-image-diff-screenshots/comparison/simpleVisual.cy.ts-sixframe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions
56
packages/jbrowse-plugin-apollo/cypress/e2e/showWarnings.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
describe('Visual', () => { | ||
beforeEach(() => { | ||
cy.loginAsGuest() | ||
}) | ||
afterEach(() => { | ||
cy.deleteAssemblies() | ||
}) | ||
it('Show warnings', () => { | ||
cy.addAssemblyFromGff( | ||
'stopcodon.gff3', | ||
'test_data/cdsChecks/stopcodon.gff3', | ||
) | ||
cy.selectAssemblyToView('stopcodon.gff3') | ||
cy.searchFeatures('gene07', 1) | ||
|
||
// Here it would be nice to check that there are no ErrorIcons yet. | ||
// For this we need to make sure that the gene model is actually on the canvas, | ||
// which is not obvious how to do. | ||
|
||
cy.get('button[data-testid="track_menu_icon"]').click() | ||
cy.contains('Appearance').trigger('mouseover') | ||
cy.contains('Show both graphical and table display').click() | ||
cy.contains('cds07').rightclick() | ||
cy.contains('Edit feature details').click() | ||
cy.contains('Basic information') | ||
.parent() | ||
.within(() => { | ||
cy.get('input[value="16"]').type('{selectall}{backspace}4{enter}') | ||
cy.get('input[value="27"]').type('{selectall}{backspace}24{enter}') | ||
}) | ||
cy.get('button[data-testid="zoom_out"]').click() | ||
|
||
// FIXME: There should be 2 ErrorIcons not 3 | ||
cy.get('[data-testid="ErrorIcon"]', { timeout: 5000 }).should( | ||
'have.length', | ||
3, | ||
) | ||
cy.get('[data-testid="ErrorIcon"]', { timeout: 5000 }) | ||
.last() | ||
.trigger('mouseover') | ||
cy.contains(/(internal stop codon)|(missing stop codon)/) | ||
|
||
// Fix the missing stop codon. Internal stop still expected | ||
cy.contains('Basic information') | ||
.parent() | ||
.within(() => { | ||
cy.get('input[value="24"]').type('{selectall}{backspace}27{enter}') | ||
}) | ||
cy.get('button[data-testid="zoom_out"]').click() | ||
cy.reload() | ||
cy.get('[data-testid="ErrorIcon"]', { timeout: 5000 }).should( | ||
'have.length', | ||
1, | ||
) | ||
}) | ||
}) |
23 changes: 23 additions & 0 deletions
23
packages/jbrowse-plugin-apollo/cypress/e2e/simpleVisual.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
describe('Simple tests for visuals', () => { | ||
beforeEach(() => { | ||
cy.loginAsGuest() | ||
}) | ||
afterEach(() => { | ||
cy.deleteAssemblies() | ||
}) | ||
it('Shows correct gene model', () => { | ||
cy.addAssemblyFromGff( | ||
'stopcodon.gff3', | ||
'test_data/cdsChecks/stopcodon.gff3', | ||
) | ||
cy.selectAssemblyToView('stopcodon.gff3') | ||
cy.searchFeatures('gene08', 1) | ||
cy.wait(5000) // Wait for the gene model to render. It would be better to ensure some element of the canvas is actually there | ||
|
||
cy.get('canvas[data-testid="overlayCanvas"]').compareSnapshot('gene-model') | ||
|
||
cy.get('canvas[data-testid="seqTrackOverlayCanvas"]').compareSnapshot( | ||
'sixframe', | ||
) | ||
}) | ||
}) |
15 changes: 0 additions & 15 deletions
15
packages/jbrowse-plugin-apollo/cypress/e2e/test-visual.cy.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters