on xenial help sign in
add test
a3d40deAndrea Cimitan
tests/qmltests/Dash/tst_DashContent.qml+14−1
@@ -524,7 +524,7 @@ Item {
524 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
524 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
525 var headerContainer = findChild(pageHeader, "headerContainer");
525 var headerContainer = findChild(pageHeader, "headerContainer");
526
526
527− // test that closing the filters popover without a search unfocuses and removes the navigation
527+
528 mouseClick(searchButton);
528 mouseClick(searchButton);
529 tryCompare(peExtraPanel, "visible", true);
529 tryCompare(peExtraPanel, "visible", true);
530
530
@@ -536,6 +536,19 @@ Item {
536 filtersPopover = findChild(shell, "filtersPopover")
536 filtersPopover = findChild(shell, "filtersPopover")
537 verify(filtersPopover);
537 verify(filtersPopover);
538
538
539+ // test that popover resizes
540+ var shellWidth = shell.width;
541+ var popoverWidth = filtersPopover.contentWidth;
542+
543+ shell.width = shellWidth + units.gu(60);
544+ waitForRendering(shell);
545+
546+ tryCompare(filtersPopover, "contentWidth", popoverWidth + units.gu(60));
547+
548+ shell.width = shellWidth;
549+ waitForRendering(shell);
550+
551+ // test that closing the filters popover without a search unfocuses and removes the navigation
539 mouseClick(shell, shell.width - 1, shell.height - 1);
552 mouseClick(shell, shell.width - 1, shell.height - 1);
540
553
541 tryCompare(pageHeader.extraPanel, "visible", false);
554 tryCompare(pageHeader.extraPanel, "visible", false);