-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Limit the height of the breakout popover * Allow the click action popover to untether to prevent overflowing the screen * Add reproduction for #43075 * Rename breaktrhough to breakout Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com> * Use findAllByTestId Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com> * Remove copy pasted question name Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com> * Remove unused api intercept Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com> --------- Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
- Loading branch information
1 parent
023ca9d
commit 2145b3c
Showing
3 changed files
with
57 additions
and
12 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
e2e/test/scenarios/visualizations-charts/reproductions/43075-dropdown-overflows.cy.spec.ts
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,40 @@ | ||
import { SAMPLE_DATABASE } from "e2e/support/cypress_sample_database"; | ||
import { | ||
createQuestion, | ||
popover, | ||
restore, | ||
type StructuredQuestionDetails, | ||
} from "e2e/support/helpers"; | ||
|
||
const { PRODUCTS, PRODUCTS_ID } = SAMPLE_DATABASE; | ||
|
||
const questionDetails: StructuredQuestionDetails = { | ||
query: { | ||
"source-table": PRODUCTS_ID, | ||
aggregation: [["count"]], | ||
breakout: [["field", PRODUCTS.CATEGORY, null]], | ||
}, | ||
}; | ||
|
||
describe("issue 43075", () => { | ||
beforeEach(() => { | ||
cy.viewport(1000, 300); | ||
|
||
restore(); | ||
cy.signInAsAdmin(); | ||
|
||
createQuestion(questionDetails, { visitQuestion: true }); | ||
}); | ||
|
||
it("the breakout popover should fit within the window (metabase#43075)", () => { | ||
cy.findAllByTestId("cell-data").contains("54").click(); | ||
popover().findByText("Break out by…").click(); | ||
popover().findByText("Category").click(); | ||
|
||
cy.window().then(win => { | ||
expect(win.document.documentElement.scrollHeight).to.be.lte( | ||
win.document.documentElement.offsetHeight, | ||
); | ||
}); | ||
}); | ||
}); |
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
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