SquishTests: Fix finding line edit on wizard

Change-Id: I75059b7e302b1e54b8ac78357f631ca2fd15269a
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Christian Stenger
2023-10-06 11:01:56 +02:00
parent 509249cac6
commit c45ab95400
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -50,9 +50,10 @@ FileWizardPage::FileWizardPage(QWidget *parent) :
d->m_defaultSuffixLabel = new QLabel;
d->m_nameLabel = new QLabel;
d->m_nameLineEdit = new FileNameValidatingLineEdit;
d->m_nameLineEdit->setObjectName("nameLineEdit");
d->m_nameLineEdit->setObjectName("nameLineEdit"); // used by Squish
d->m_pathLabel = new QLabel;
d->m_pathChooser = new PathChooser;
d->m_pathChooser->setObjectName("fullPathChooser"); // used by Squish
d->m_pathChooser->setExpectedKind(PathChooser::Directory);
d->m_nameLabel->setText(Tr::tr("File name:"));
@@ -8,8 +8,8 @@ def addFileToProject(projectPath, category, fileTemplate, fileName):
nameLineEdit = waitForObject("{name='nameLineEdit' type='Utils::FileNameValidatingLineEdit' "
"visible='1'}")
replaceEditorContent(nameLineEdit, fileName)
pathLineEdit = waitForObject("{type='Utils::FancyLineEdit' unnamed='1' visible='1' "
"toolTip?='Full path: *'}")
pathChooser = waitForObject("{type='Utils::PathChooser' name='fullPathChooser'}")
pathLineEdit = getChildByClass(pathChooser, "Utils::FancyLineEdit")
if not test.compare(pathLineEdit.text,
projectPath, "Verifying whether path is correct."):
replaceEditorContent(pathLineEdit, projectPath)