mirror of
https://github.com/getredash/redash.git
synced 2025-12-25 01:03:20 -05:00
Fix Cypress issues after React version of Query Pages (#4545)
* Update Pivot rows assertion * Allow replacing Query results with Apply Changes
This commit is contained in:
committed by
Arik Fraimovich
parent
ebcec85c0c
commit
086798bbb7
@@ -153,7 +153,7 @@ function QuerySource(props) {
|
||||
|
||||
const doExecuteQuery = useCallback(
|
||||
(skipParametersDirtyFlag = false) => {
|
||||
if (!queryFlags.canExecute || (!skipParametersDirtyFlag && areParametersDirty) || isQueryExecuting) {
|
||||
if (!queryFlags.canExecute || (!skipParametersDirtyFlag && (areParametersDirty || isQueryExecuting))) {
|
||||
return;
|
||||
}
|
||||
if (isDirty || !isEmpty(selectedText)) {
|
||||
|
||||
@@ -59,7 +59,7 @@ function QueryView(props) {
|
||||
|
||||
const doExecuteQuery = useCallback(
|
||||
(skipParametersDirtyFlag = false) => {
|
||||
if (!queryFlags.canExecute || (!skipParametersDirtyFlag && areParametersDirty) || isQueryExecuting) {
|
||||
if (!queryFlags.canExecute || (!skipParametersDirtyFlag && (areParametersDirty || isQueryExecuting))) {
|
||||
return;
|
||||
}
|
||||
executeQuery();
|
||||
|
||||
@@ -96,9 +96,8 @@ describe("Pivot", () => {
|
||||
cy.visit(`queries/${this.queryId}/source#${visualization.id}`);
|
||||
cy.getByTestId("ExecuteButton").click();
|
||||
|
||||
cy.getByTestId(`QueryPageVisualization${visualization.id}`)
|
||||
.find(".pvtGrandTotal")
|
||||
.should("have.text", "11"); // assert number of rows is 11
|
||||
// assert number of rows is 11
|
||||
cy.getByTestId(`QueryPageVisualization${visualization.id}`).contains(".pvtGrandTotal", "11");
|
||||
|
||||
cy.getByTestId("QueryEditor")
|
||||
.get(".ace_text-input")
|
||||
@@ -109,9 +108,8 @@ describe("Pivot", () => {
|
||||
cy.getByTestId("SaveButton").click();
|
||||
cy.getByTestId("ExecuteButton").click();
|
||||
|
||||
cy.getByTestId(`QueryPageVisualization${visualization.id}`)
|
||||
.find(".pvtGrandTotal")
|
||||
.should("have.text", "12"); // assert number of rows is 12
|
||||
// assert number of rows is 12
|
||||
cy.getByTestId(`QueryPageVisualization${visualization.id}`).contains(".pvtGrandTotal", "12");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user