Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F112901
tst_EventViewRedacted.qml
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
tst_EventViewRedacted.qml
View Options
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import
QtQuick
2.3
import
QtTest
1.0
import
'../../contents/ui'
as
Kazv
import
'test-helpers'
as
QmlHelpers
QmlHelpers
.
TestItem
{
id: item
property
var
event:
({
eventId:
''
,
sender:
''
,
type:
'm.room.message'
,
stateKey:
''
,
content:
{
},
redacted:
true
,
encrypted:
false
,
isState:
false
,
unsignedData:
{},
isLocalEcho:
false
,
isSending:
false
,
isFailed:
false
,
txnId:
'some-txn-id'
,
})
property
var
sender:
({
membership:
'join'
,
userId:
'@foo:tusooa.xyz'
,
name:
'foo'
,
avatarMxcUri:
''
,
})
Kazv
.
EventView
{
id: eventView
event:
item
.
event
sender:
item
.
sender
}
TestCase
{
id: eventViewRedactedTest
name:
'EventViewRedactedTest'
when:
windowShown
function
test_redacted
()
{
verify
(
eventView
.
getMessageType
(
event
)
===
'redacted'
);
const
child
=
findChild
(
eventView
,
'redactedEvent'
);
verify
(
child
);
verify
(
child
.
text
===
l10n
.
get
(
'event-deleted'
));
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 2:48 AM (18 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39279
Default Alt Text
tst_EventViewRedacted.qml (1 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment