aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/system/suite_installation/tst_9_uninstall_verify/test.py
blob: 6579363e1e53b1889e60dab4bcd7350d46a40b5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
####################################################################################################
# Copyright (C) 2023 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
####################################################################################################

# -*- coding: utf-8 -*-

source("../../shared/utils.py")
source("../shared/scripts/install_utils.py")

import names


def main():
    version = startAppGetVersion()
    if not version:
        return
    vsToolsLabelText = selectInstalledVsTools(version)
    test.compare(vsToolsLabelText, None,
                "Are 'Qt VS Tools for Visual Studio %s' installed?" % version)
    clickButton(waitForObject(names.manage_Extensions_Close_Button))
    checkMenuItems(version)
    closeMainWindow()


def checkMenuItems(version):
    try:
        openVsToolsMenu(version)
        test.fail("Surplus menu items", "Qt VS Tools show unexpected menu items.")
        mouseClick(waitForObject(globalnames.file_MenuItem))  # Close menu
    except:
        mouseClick(waitForObject(globalnames.file_MenuItem))  # Close Extensions menu
        test.passes("Qt VS Tools do not show unexpected menu items.")