Skip to content

Commit b6d0770

Browse files
printfdebuggingeszkadev
authored andcommitted
Add dialog width test for the "Page Style" dialog
Recent iconview expander work [1] introduced a regression which increased the width of iconviews in the dialogs increasing their overall width. This was caused by css selectors class selectors which targeted both the notebookbar iconview-expander iconviews and the dialog iconviews. [2] fixed the regression. [1]: - PR: make iconview expandable - URL: #12654 [2]: - PR: fix large iconviews in dialogs - URL: #13788 - FIX-COMMIT: 1514f8e Signed-off-by: Sahil Gautam <[email protected]> Change-Id: Ifcbeb0d5f606ddd7361fe21d05ccbd6c8f57e357
1 parent a5b3eb8 commit b6d0770

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/* global describe it cy beforeEach require */
2+
3+
var helper = require('../../common/helper');
4+
var desktopHelper = require('../../common/desktop_helper')
5+
6+
describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Page Style dialog tests', function() {
7+
beforeEach(function() {
8+
helper.setupAndLoadDocument('writer/styles.odt');
9+
cy.viewport(1920, 720);
10+
});
11+
12+
/*
13+
* tests if the width of the 'Page Style dialog' is larger than a "reasonable"
14+
* width and if it's larger that means something is obviously wrong, probably
15+
* some css property.
16+
* `reasonableWidth` = width at the time of writing this test + 15px ;)
17+
*/
18+
it('Page Style dialog width', function() {
19+
cy.cGet('#Format-tab-label').click();
20+
desktopHelper.getNbIcon('PageDialog', 'Format').click();
21+
22+
cy.cGet('[id^="TemplateDialog"]')
23+
.should('be.visible')
24+
.invoke('width')
25+
.should('be.greaterThan', 588).and('be.lessThan', 605);
26+
});
27+
});

0 commit comments

Comments
 (0)