Skip to content

Commit

Permalink
Sort features by default in counterfactual flyout (#1312)
Browse files Browse the repository at this point in the history
* Sort features by default in counterfactual flyout

Signed-off-by: Gaurav Gupta <[email protected]>

* Fix failing tests

Signed-off-by: Gaurav Gupta <[email protected]>

* attempt to fix test

Signed-off-by: Gaurav Gupta <[email protected]>

* Remove check

Signed-off-by: Gaurav Gupta <[email protected]>
  • Loading branch information
gaugup committed Apr 21, 2022
1 parent cf9770c commit 631b0ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@ export function describeWhatIfCreate(dataShape: IModelAssessmentData): void {
.eq(2)
.contains(dataShape.whatIfCounterfactualsData?.searchBarQuery || "");
cy.get(Locators.WhatIfSearchBarClearTextButton).click();
cy.get(Locators.WhatIfColumnHeaders)
.eq(2)
.contains(
dataShape.whatIfCounterfactualsData?.columnHeaderBeforeSort || ""
);
cy.get(Locators.WhatIfColumnHeaders).contains(
dataShape.whatIfCounterfactualsData?.columnHeaderAfterSort || ""
);
});

it("Should have 'Create your own counterfactual' section and it should be editable", () => {
Expand Down
2 changes: 1 addition & 1 deletion libs/counterfactuals/src/lib/CounterfactualPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class CounterfactualPanel extends React.Component<
super(props);
this.state = {
filterText: undefined,
sortFeatures: false
sortFeatures: true
};
}
public render(): React.ReactNode {
Expand Down

0 comments on commit 631b0ae

Please sign in to comment.