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

Commit

Permalink
fixing breaking enzyme tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tnrich committed Mar 4, 2021
1 parent d194f7e commit f060efa
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
3 changes: 1 addition & 2 deletions cypress/integration/properties.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ describe("properties", function () {
//Part 0 should be in there
cy.get(`[data-test="ve-genbank-text"]`).contains("Part 0");
});
it(`can right click multiple of the same cutsite type (FokI)
and have the cutsite properties table jump to the correct cutsite`, () => {
it(`can right click multiple of the same cutsite type (FokI) and have the cutsite properties table jump to the correct cutsite`, () => {
cy.get(".ve-tool-container-cutsiteTool .veToolbarDropdown").click();
cy.get(".tg-select-clear-all").click();
cy.get(`.veToolbarCutsiteFilterHolder .tg-select`).click();
Expand Down
61 changes: 31 additions & 30 deletions src/CutsiteFilter/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { connect } from "react-redux";
import { compose } from "redux";
import { Classes, Icon } from "@blueprintjs/core";
import { Icon } from "@blueprintjs/core";

import withEditorProps from "../withEditorProps";
import specialCutsiteFilterOptions from "../constants/specialCutsiteFilterOptions";
Expand All @@ -9,7 +9,7 @@ import React from "react";
import EnzymesDialog from "../helperComponents/EnzymesDialog";

import "./style.css";
import { TgSelect, wrapDialog } from "teselagen-react-components";
import { TgSelect } from "teselagen-react-components";

import map from "lodash/map";
import { flatMap } from "lodash";
Expand Down Expand Up @@ -234,32 +234,33 @@ const getLabel = (maybeCutsites = [], val) => {
};

function addClickableLabel(toRet) {
return {
...toRet,
...(toRet.label
? {
label: (
<div
className="tg-clickable-cutsite-label"
style={{ cursor: "pointer" }}
onClick={() => {
showDialog({
Component: wrapDialog()(() => {
return <div className={Classes.DIALOG_BODY}>yaa</div>;
}),
props: {
dialogProps: {
title: "hahah"
},
yaa: "baby"
}
});
}}
>
{toRet.label}
</div>
)
}
: {})
};
return toRet;
// return {
// ...toRet,
// ...(toRet.label
// ? {
// label: (
// <div
// className="tg-clickable-cutsite-label"
// style={{ cursor: "pointer" }}
// onClick={() => {
// showDialog({
// Component: wrapDialog()(() => {
// return <div className={Classes.DIALOG_BODY}>yaa</div>;
// }),
// props: {
// dialogProps: {
// title: "hahah"
// },
// yaa: "baby"
// }
// });
// }}
// >
// {toRet.label}
// </div>
// )
// }
// : {})
// };
}

0 comments on commit f060efa

Please sign in to comment.