Skip to content
Snippets Groups Projects
Unverified Commit 9526a37e authored by Oisin Coveney's avatar Oisin Coveney Committed by GitHub
Browse files

Add test for question title overflow (#31465)

parent 8a233561
No related branches found
No related tags found
No related merge requests found
......@@ -250,4 +250,21 @@ describe("scenarios > question > saved", () => {
assertColumnResized();
});
});
it("should always be possible to view the full title text of the saved question", () => {
visitQuestion(1);
const savedQuestionTitle = cy.findByTestId("saved-question-header-title");
savedQuestionTitle.clear();
savedQuestionTitle.type(
"Space, the final frontier. These are the voyages of the Starship Enterprise.",
);
savedQuestionTitle.blur();
savedQuestionTitle.should("be.visible").should($el => {
// clientHeight: height of the textarea
// scrollHeight: height of the text content, including content not visible on the screen
const heightDifference = $el[0].clientHeight - $el[0].scrollHeight;
expect(heightDifference).to.eq(0);
});
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment