Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F113202
tst_AvatarImageAdapters.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_AvatarImageAdapters.qml
View Options
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import
QtQuick
import
QtQuick
.
Layouts
import
QtTest
import
'../../contents/ui'
as
Kazv
import
'./test-helpers'
as
QmlHelpers
QmlHelpers
.
TestItem
{
id: item
ColumnLayout
{
Kazv
.
AvatarAdapter
{
id: avatar
mxcUri:
'mxc://example.com/xxx'
}
Kazv
.
ImageAdapter
{
id: image
mxcUri:
'mxc://example.com/yyy'
}
}
TestCase
{
id: avatarImageAdaptersTest
name:
'AvatarImageAdaptersTest'
when:
windowShown
function
init
()
{
item
.
mockHelper
.
clearAll
();
}
function
test_avatarReactive
()
{
compare
(
item
.
kazvIOManager
.
cacheFile
.
calledTimes
(),
0
);
avatar
.
mxcUri
=
'mxc://example.com/zzz'
;
compare
(
item
.
kazvIOManager
.
cacheFile
.
calledTimes
(),
1
);
}
function
test_imageReactive
()
{
compare
(
item
.
kazvIOManager
.
cacheFile
.
calledTimes
(),
0
);
image
.
mxcUri
=
'mxc://example.com/zzz'
;
compare
(
item
.
kazvIOManager
.
cacheFile
.
calledTimes
(),
1
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 3:50 PM (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39467
Default Alt Text
tst_AvatarImageAdapters.qml (1 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment