Page MenuHomePhorge

tst_DevicePopup.qml
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

tst_DevicePopup.qml

/*
* 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/device-mgmt' as KazvDM
import 'test-helpers.js' as Helpers
Item {
width: 800
height: 600
property var l10n: Helpers.fluentMock
property var deviceItem: ({
deviceId: 'some-id',
displayName: 'name',
trustLevel: 'unseen'
})
KazvDM.Device {
id: device
item: deviceItem
}
TestCase {
id: devicePopupTest
name: 'DevicePopupTest'
when: windowShown
function initTestCase() {
}
function test_trustLevelPopup() {
device.sheet.open();
tryVerify(() => device.sheet.getNewTrustLevel() === 'unseen', 1000);
const buttons = findChild(device.sheet, 'trustLevelChoices');
buttons.parent = device; // force showing, the OverlaySheet does not seem to show properly
const button = findChild(buttons, 'trustLevelChoice_verified');
mouseClick(button);
tryVerify(() => device.sheet.getNewTrustLevel() === 'verified', 1000);
}
}
}

File Metadata

Mime Type
text/plain
Expires
Tue, Jun 24, 5:47 AM (2 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
88066
Default Alt Text
tst_DevicePopup.qml (1 KB)

Event Timeline