Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
merging in master
Browse files Browse the repository at this point in the history
  • Loading branch information
tnrich committed Oct 7, 2020
2 parents 13703db + 2b4d145 commit cd10022
Show file tree
Hide file tree
Showing 132 changed files with 10,727 additions and 8,239 deletions.
28 changes: 0 additions & 28 deletions .circleci/config.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .deprc

This file was deleted.

Empty file removed .flowconfig
Empty file.
1 change: 0 additions & 1 deletion .fontello

This file was deleted.

10 changes: 0 additions & 10 deletions .github-webhook

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Cypress tests
on: [push]
jobs:
cypress-run:
name: Cypress run
runs-on: ubuntu-16.04
strategy:
matrix:
# the actual items in the array do not matter,
# just the number - to force CI to sping 3 copies
# of the current job in parallel
machines: [1, 2, 3]
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Cypress run
uses: cypress-io/github-action@v2
with:
record: true
parallel: true
start: yarn start
wait-on: http://localhost:3344
env:
WITH_COVERAGE: true
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: 0dcf0c08-68ce-4547-aaaa-ac33af76e4a9
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v1
with:
directory: ./coverage/
name: codecov-umbrella
# fail_ci_if_error: true
path_to_write_report: ./coverage/codecov_report.gz
# - name: Upload coverage result
# uses: actions/upload-artifact@v2
# with:
# name: cypress-coverage
# path: coverage
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ npm-debug.log*
/cypress/screenshots
.linkEnv
.idea
.DS_Store
.DS_Store
.nyc_output
5 changes: 0 additions & 5 deletions .jsbeautifyrc

This file was deleted.

7 changes: 0 additions & 7 deletions .release.json

This file was deleted.

35 changes: 0 additions & 35 deletions Makefile

This file was deleted.

132 changes: 116 additions & 16 deletions cypress/integration/alignment.spec.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,126 @@
describe("editor", function() {
beforeEach(() => {
describe("editor", function () {
it("adding selection right click options should work", function () {
cy.visit("#/Alignment");
cy.tgToggle("addSelectionRightClickOptions");
cy.selectAlignmentRange(10, 20);
cy.get(".veAlignmentSelectionLayer:first").rightclick({ force: true });
cy.contains(".bp3-menu-item", "I'm an additional option").click();
cy.contains(".bp3-toast", "You did it");
});
it("overriding right click options should work", function () {
cy.visit("#/Alignment");
cy.tgToggle("overrideSelectionRightClick");
cy.selectAlignmentRange(10, 20);
cy.get(".veAlignmentSelectionLayer:first").rightclick({ force: true });
cy.contains(".bp3-toast", "lezzz goooo!");
});
it("selection right click options should work and the additionalTopEl should be visible", function () {
cy.visit("#/Alignment");
cy.contains("Additional Top El");
cy.selectAlignmentRange(10, 20);
cy.get(".veAlignmentSelectionLayer:first").rightclick({ force: true });
cy.contains(".bp3-menu-item", "Copy Selection of F05225 as Fasta");
cy.contains(".bp3-menu-item", "Copy Selection of All Alignments ").click();
cy.contains(".bp3-toast", "Selection Copied");
});

it("can drag the alignment", function() {
cy.get(".veRowViewSelectionLayer")
.first()
.should("not.be.visible");

cy.tgToggle("isFullyZoomedOut");
cy.contains("text", "355")
it("dragging in the alignment should only allow non-origin wrapping selections", function () {
cy.visit("#/Alignment");
cy.scrollAlignmentToPercent(0.0257);
cy.contains(`[data-alignment-track-index="1"] text`, 100).click();
cy.get("body").type("{shift}", { release: false });
cy.contains(`[data-alignment-track-index="1"] text`, 110).click();
cy.get(`[title="Selecting 10 bps from 101 to 110"]`);
cy.get(`[title="Caret Between Bases 100 and 101"]`)
.first()
.then(el => {
cy.contains("text", "710")
.then((el) => {
cy.contains(`[data-alignment-track-index="1"] text`, 120)
.first()
.then(el2 => {
cy.dragBetween(el, el2);
.then((el2) => {
cy.dragBetweenSimple(el, el2);
});
});
cy.get(".veRowViewSelectionLayer")
.first()
.should("be.visible");
cy.get(`[title="Selecting 11 bps from 111 to 121"]`);
cy.get(`[title="Caret Between Bases 121 and 122"]`).then((el) => {
cy.contains(`[data-alignment-track-index="1"] text`, 100)
.first()
.then((el2) => {
cy.dragBetweenSimple(el, el2);
});
});
cy.get(`[title="Selecting 10 bps from 101 to 110"]`);
});
it("shift clicking in the alignment should only allow non-origin wrapping selections (no selection present)", function () {
cy.visit("#/Alignment");
cy.contains(`[data-alignment-track-index="1"] text`, 10).click();
cy.get("body").type("{shift}", { release: false });
cy.scrollAlignmentToPercent(0.99);
cy.contains(`[data-alignment-track-index="1"] text`, 3510).click();
cy.get(`[title="Selecting 3500 bps from 11 to 3510"]`);
});
it("the alignment should show axis numbers correctly", function () {
cy.visit("#/Alignment?alignmentDataId=39");

cy.scrollAlignmentToPercent(0.3);
cy.contains(`[data-alignment-track-index="5"] .veAxis`, "290");
cy.contains(`[data-alignment-track-index="5"] .veAxis`, "300");
cy.contains(`[data-alignment-track-index="5"] .veAxis`, "310");
});
it("shift clicking in the alignment should only allow non-origin wrapping selections (with a selection already present)", function () {
cy.visit("#/Alignment");
// cy.tgToggle("isFullyZoomedOut");
cy.get(`[data-alignment-track-index="1"]`);
cy.selectAlignmentRange(56, 67);

cy.get("body").type("{shift}", { release: false });
cy.scrollAlignmentToPercent(0.99);
cy.contains(`[data-alignment-track-index="1"] text`, 3510).click();
cy.get(`[title="Selecting 3455 bps from 56 to 3510"]`);
});
it("scrolls the yellow scroll handle correctly", function () {
cy.visit("#/Alignment");
cy.contains("F05225").should("not.exist");
cy.get(`[data-lane-index="13"]`).click();
cy.contains("F05225").should("exist");
});
it("can turn on/off the axis with one click", function () {
cy.visit("#/Alignment");
cy.contains(".alignmentHolder .veRowViewAxis", 1);
cy.get("button .bp3-icon-eye-open").click();

cy.contains(".bp3-checkbox", "Axis").click();
cy.contains(".alignmentHolder .veRowViewAxis", 1).should("not.exist");
});

it("can drag the alignment", function () {
cy.visit("#/Alignment");
cy.get(".veAlignmentSelectionLayer").should("not.exist");
cy.tgToggle("isFullyZoomedOut");

cy.contains("text", "1000").then((el) => {
cy.contains("text", "2000")
.first()
.then((el2) => {
cy.dragBetweenSimple(el, el2);
});
});
cy.get(".veAlignmentSelectionLayer").first().should("be.visible");
});

it("can disable clicking and dragging within the alignment", function () {
cy.visit("#/Alignment");
cy.tgToggle("noClickDragHandlers");
cy.get(".veAlignmentSelectionLayer").should("not.exist");

cy.tgToggle("isFullyZoomedOut");
cy.contains("text", "1000").then((el) => {
cy.contains("text", "2000")
.first()
.then((el2) => {
cy.dragBetweenSimple(el, el2);
});
});
cy.get(".veAlignmentSelectionLayer").should("not.exist");
});
});

Expand Down
29 changes: 0 additions & 29 deletions cypress/integration/caretAndSelectionLogic.spec.js

This file was deleted.

Loading

0 comments on commit cd10022

Please sign in to comment.