-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui: Default sort by Execution Count column for Statements
Before, default sorting was set to Latency column in Statements page that was unintuitive. Now it is sorted by Execution count column. Release note (admin ui change): Change default sorting column on Statements page to Execution Count Release justification: bug fixes and low-risk updates to new functionality
- Loading branch information
Showing
2 changed files
with
41 additions
and
5 deletions.
There are no files selected for viewing
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,34 @@ | ||
// Copyright 2018 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
import React from "react"; | ||
import { assert } from "chai"; | ||
import { ReactWrapper } from "enzyme"; | ||
|
||
import { connectedMount } from "src/test-utils"; | ||
import StatementsPageConnected, { | ||
StatementsPage, | ||
StatementsPageProps, | ||
StatementsPageState, | ||
} from "src/views/statements/statementsPage"; | ||
|
||
describe("StatementsPage", () => { | ||
describe("Statements table", () => { | ||
it("sorts data by Execution Count DESC as default option", () => { | ||
const rootWrapper = connectedMount(() => <StatementsPageConnected />); | ||
|
||
const statementsPageWrapper: ReactWrapper<StatementsPageProps, StatementsPageState> = rootWrapper.find(StatementsPage).first(); | ||
const statementsPageInstance = statementsPageWrapper.instance(); | ||
|
||
assert.equal(statementsPageInstance.state.sortSetting.sortKey, 3); | ||
assert.equal(statementsPageInstance.state.sortSetting.ascending, false); | ||
}); | ||
}); | ||
}); |
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