on xenial help sign in
Fixed shell test orientation defaults
commit7e21c7159f0f58fee9846ac8f82eb2f810b8772b authorNick Dedekind <nick.dedekind@canonical.com> dateWed 4 Nov 2015, 12:45 (11 years ago) parente9e1272
2 files changed+18−3
tests/qmltests/Stages/tst_TabletStage.qml+4−1 tests/qmltests/tst_Shell.qml+14−2
tests/qmltests/Stages/tst_TabletStage.qml+4−1
@@ -53,7 +53,10 @@ Rectangle {
5353 shellOrientation: Qt.LandscapeOrientation
5454 nativeWidth: width
5555 nativeHeight: height
56− orientations: Orientations{} // Defaults are fine for testing
56+ orientations: Orientations {
57+ native_: Qt.LandscapeOrientation
58+ primary: Qt.LandscapeOrientation
59+ }
5760 focus: true
5861 }
5962 }
tests/qmltests/tst_Shell.qml+14−2
@@ -61,6 +61,10 @@ Rectangle {
6161
6262 anchors.centerIn: parent
6363
64+ property int shellOrientation: Qt.PortraitOrientation
65+ property int nativeOrientation: Qt.PortraitOrientation
66+ property int primaryOrientation: Qt.PortraitOrientation
67+
6468 state: "phone"
6569 states: [
6670 State {
@@ -77,6 +81,9 @@ Rectangle {
7781 target: shellLoader
7882 width: units.gu(100)
7983 height: units.gu(71)
84+ shellOrientation: Qt.LandscapeOrientation
85+ nativeOrientation: Qt.LandscapeOrientation
86+ primaryOrientation: Qt.LandscapeOrientation
8087 }
8188 },
8289 State {
@@ -99,8 +106,13 @@ Rectangle {
99106 Shell {
100107 id: __shell
101108 usageScenario: usageScenarioSelector.model[usageScenarioSelector.selectedIndex]
102− orientation: Qt.PortraitOrientation
103− orientations: Orientations{} // Defaults are fine for testing
109+ nativeWidth: width
110+ nativeHeight: height
111+ orientation: shellLoader.shellOrientation
112+ orientations: Orientations {
113+ native_: shellLoader.nativeOrientation
114+ primary: shellLoader.primaryOrientation
115+ }
104116 Component.onDestruction: {
105117 shellLoader.itemDestroyed = true;
106118 }