Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F112546
D56.1732332812.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D56.1732332812.diff
View Options
diff --git a/src/contents/ui/CreateRoomPage.qml b/src/contents/ui/CreateRoomPage.qml
--- a/src/contents/ui/CreateRoomPage.qml
+++ b/src/contents/ui/CreateRoomPage.qml
@@ -87,30 +87,31 @@
Kirigami.FormData.label: l10n.get('create-room-invite-userids-prompt')
}
- ListView {
- model: createRoomPage.inviteUserIds.length
- Layout.fillWidth: true
- Layout.minimumHeight: childrenRect.height
- delegate: Kirigami.SwipeListItem {
- objectName: 'inviteUserItem_' + index
- required property var index
- Label {
- objectName: 'inviteUserIdLabel'
- text: createRoomPage.inviteUserIds[index]
- }
+ ColumnLayout {
+ Repeater {
+ model: createRoomPage.inviteUserIds.length
+ delegate: Kirigami.SwipeListItem {
+ objectName: 'inviteUserItem_' + index
+ Layout.fillWidth: true
+ Layout.minimumWidth: Kirigami.Units.gridUnit * 10
+ Label {
+ objectName: 'inviteUserIdLabel'
+ text: createRoomPage.inviteUserIds[index]
+ }
- actions: [
- Kirigami.Action {
- objectName: 'removeInviteAction'
- icon.name: 'list-remove-symbolic'
- text: l10n.get('create-room-page-action-remove-invite')
- onTriggered: {
- createRoomPage.inviteUserIds.splice(index, 1);
- // trigger reactivity
- createRoomPage.inviteUserIds = createRoomPage.inviteUserIds;
+ actions: [
+ Kirigami.Action {
+ objectName: 'removeInviteAction'
+ icon.name: 'list-remove-symbolic'
+ text: l10n.get('create-room-page-action-remove-invite')
+ onTriggered: {
+ createRoomPage.inviteUserIds.splice(index, 1);
+ // trigger reactivity
+ createRoomPage.inviteUserIds = createRoomPage.inviteUserIds;
+ }
}
- }
- ]
+ ]
+ }
}
}
TextField {
diff --git a/src/tests/quick-tests/test-helpers.js b/src/tests/quick-tests/test-helpers.js
--- a/src/tests/quick-tests/test-helpers.js
+++ b/src/tests/quick-tests/test-helpers.js
@@ -27,6 +27,12 @@
},
};
+const isSubset = (a, b) => {
+ return Object.entries(a).every(([k, v]) => {
+ return k in b && deepEqual(v, b[k]);
+ });
+}
+
const deepEqual = (a, b) => {
if (a === b) {
return true;
@@ -36,9 +42,7 @@
}
return a.every((item, index) => deepEqual(item, b[index]));
} else if (typeof a === 'object' && typeof b === 'object' && a && b) {
- const ae = Object.entries(a).sort(([f], [s]) => f > s ? 1 : f < s ? -1 : 0);
- const be = Object.entries(b).sort(([f], [s]) => f > s ? 1 : f < s ? -1 : 0);
- return deepEqual(ae, be);
+ return isSubset(a, b) && isSubset(b, a);
} else {
return false;
}
diff --git a/src/tests/quick-tests/tst_CreateRoomPage.qml b/src/tests/quick-tests/tst_CreateRoomPage.qml
--- a/src/tests/quick-tests/tst_CreateRoomPage.qml
+++ b/src/tests/quick-tests/tst_CreateRoomPage.qml
@@ -58,6 +58,7 @@
property var sdkVars: ({})
Kazv.CreateRoomPage {
+ anchors.fill: parent
id: createRoomPage
}
@@ -66,6 +67,12 @@
name: 'CreateRoomPageTest'
when: windowShown
+ function initTestCase() {
+ if (MK.KazvUtil.kfQtMajorVersion === 6) {
+ createRoomPage.contentItem.clip = false;
+ }
+ }
+
function cleanup() {
item.matrixSdk._createRoomCalled = 0;
item.matrixSdk._createRoomArgs = {};
diff --git a/src/tests/quick-tests/tst_RoomInvitePage.qml b/src/tests/quick-tests/tst_RoomInvitePage.qml
--- a/src/tests/quick-tests/tst_RoomInvitePage.qml
+++ b/src/tests/quick-tests/tst_RoomInvitePage.qml
@@ -11,6 +11,7 @@
import '../../contents/ui/room-settings' as RoomSettings
import 'test-helpers.js' as Helpers
import 'test-helpers' as TestHelpers
+import moe.kazv.mxc.kazv 0.0 as MK
Item {
id: item
@@ -57,6 +58,12 @@
name: 'RoomInvitePageTest'
when: windowShown
+ function initTestCase() {
+ if (MK.KazvUtil.kfQtMajorVersion === 6) {
+ roomInvitePage.contentItem.clip = false;
+ }
+ }
+
function cleanup() {
item.room._inviteUserCalled = 0;
item.room._inviteUserPromise = undefined;
diff --git a/src/tests/quick-tests/tst_UserPage.qml b/src/tests/quick-tests/tst_UserPage.qml
--- a/src/tests/quick-tests/tst_UserPage.qml
+++ b/src/tests/quick-tests/tst_UserPage.qml
@@ -11,6 +11,7 @@
import '../../contents/ui' as Kazv
import './test-helpers' as TestHelpers
import 'test-helpers.js' as Helpers
+import moe.kazv.mxc.kazv 0.0 as MK
Item {
id: upper
@@ -120,6 +121,13 @@
name: 'UserPageTest'
when: windowShown
+ function initTestCase() {
+ if (MK.KazvUtil.kfQtMajorVersion === 6) {
+ userPage.contentItem.clip = false;
+ userPageSelf.contentItem.clip = false;
+ }
+ }
+
function cleanupTestCase() {
upper.room._setUserPowerLevelUserId = undefined;
upper.room._setUserPowerLevelPowerLevel = undefined;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 7:33 PM (14 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39061
Default Alt Text
D56.1732332812.diff (4 KB)
Attached To
Mode
D56: Fix CreateRoomPage, RoomInvitePage, UserPage tests
Attached
Detach File
Event Timeline
Log In to Comment