forked from nvaccess/nvda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix installation crash from StaticBoxSizer changes (nvaccess#12199)
Summary of the issue: The standard installation process crashes with the following traceback, caused by nvaccess#12181 Description of how this pull request fixes the issue: Fix various crashing GUI bugs introduced to the installation process in nvaccess#12181 Add smoke tests for the installation process
- Loading branch information
Showing
8 changed files
with
190 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# A part of NonVisual Desktop Access (NVDA) | ||
# Copyright (C) 2020-2021 NV Access Limited | ||
# This file may be used under the terms of the GNU General Public License, version 2 or later. | ||
# For more details see: https://www.gnu.org/licenses/gpl-2.0.html | ||
|
||
"""Logic for NVDA installation process tests. | ||
""" | ||
|
||
from robot.libraries.BuiltIn import BuiltIn | ||
# relative import not used for 'systemTestUtils' because the folder is added to the path for 'libraries' | ||
# imported methods start with underscore (_) so they don't get imported into robot files as keywords | ||
from SystemTestSpy import ( | ||
_getLib, | ||
) | ||
|
||
# Imported for type information | ||
from robot.libraries.Process import Process as _ProcessLib | ||
|
||
from AssertsLib import AssertsLib as _AssertsLib | ||
|
||
import NvdaLib as _nvdaLib | ||
from NvdaLib import NvdaLib as _nvdaRobotLib | ||
_nvdaProcessAlias = _nvdaRobotLib.nvdaProcessAlias | ||
|
||
_builtIn: BuiltIn = BuiltIn() | ||
_process: _ProcessLib = _getLib("Process") | ||
_asserts: _AssertsLib = _getLib("AssertsLib") | ||
|
||
|
||
def read_install_dialog(): | ||
"Smoke test the launcher dialogs used to install NVDA" | ||
|
||
spy = _nvdaLib.getSpyLib() | ||
launchDialog = spy.wait_for_specific_speech("NVDA Launcher") # ensure the dialog is present. | ||
spy.wait_for_speech_to_finish() | ||
spy.get_speech_at_index_until_now(launchDialog) | ||
|
||
_builtIn.sleep(1) # the dialog is not always receiving keypresses, wait a little longer for it | ||
# agree to the License Agreement | ||
spy.emulateKeyPress("alt+a") | ||
|
||
# start install | ||
spy.emulateKeyPress("alt+i") | ||
|
||
spy.wait_for_specific_speech("To install NVDA to your hard drive, please press the Continue button.") | ||
|
||
# exit NVDA Installer | ||
spy.emulateKeyPress("escape") | ||
|
||
|
||
def read_portable_copy_dialog(): | ||
"Smoke test the launcher dialogs used to create a portable copy of NVDA" | ||
|
||
spy = _nvdaLib.getSpyLib() | ||
launchDialog = spy.wait_for_specific_speech("NVDA Launcher") # ensure the dialog is present. | ||
spy.wait_for_speech_to_finish() | ||
spy.get_speech_at_index_until_now(launchDialog) | ||
|
||
_builtIn.sleep(1) # the dialog is not always receiving keypresses, wait a little longer for it | ||
# agree to the License Agreement | ||
spy.emulateKeyPress("alt+a") | ||
|
||
# start portable copy | ||
spy.emulateKeyPress("alt+p") | ||
|
||
spy.wait_for_specific_speech( | ||
"To create a portable copy of NVDA, please select the path and other options and then press Continue") | ||
|
||
# exit NVDA Installer | ||
spy.emulateKeyPress("escape") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# A part of NonVisual Desktop Access (NVDA) | ||
# Copyright (C) 2021 NV Access Limited | ||
# This file may be used under the terms of the GNU General Public License, version 2 or later. | ||
# For more details see: https://www.gnu.org/licenses/gpl-2.0.html | ||
*** Settings *** | ||
Documentation Smoke test the installation process | ||
Force Tags smoke test installer | ||
Suite Setup Run Keyword If not r'${installDir}' Fail "--installDir not supplied" | ||
|
||
# for start & quit in Test Setup and Test Teardown | ||
Library NvdaLib.py | ||
Library NVDAInstaller.py | ||
Library ScreenCapLibrary | ||
|
||
Test Setup default startup | ||
Test Teardown default teardown | ||
|
||
*** Keywords *** | ||
|
||
default teardown | ||
${screenshotName}= create_preserved_test_output_filename failedTest.png | ||
Run Keyword If Test Failed Take Screenshot ${screenShotName} | ||
quit NVDAInstaller | ||
|
||
default startup | ||
start NVDAInstaller standard-dontShowWelcomeDialog.ini | ||
|
||
default pass execution | ||
|
||
*** Test Cases *** | ||
|
||
Read install dialog | ||
[Documentation] Ensure that the install dialog can be read in full | ||
read_install_dialog # run test | ||
|
||
Read install dialog portable copy | ||
[Documentation] Ensure that the portable copy install dialog can be read in full | ||
read_portable_copy_dialog # run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters