forked from qt-creator/qt-creator
Squish: Test handling of description in tst_codepasting
Change-Id: Ib24a4863f02b479cc18c17fb3d6dc20e8dc85452 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -176,6 +176,7 @@
|
||||
:RunSettingsUseBuildEnvironment_QLabel {text~='Us(e|ing) <b>Build Environment</b>' type='QLabel' unnamed='1' visible='1'}
|
||||
:Select signal.signalList_QTreeWidget {container=':Go to slot.Select signal_QGroupBox' name='signalList' type='QTreeWidget' visible='1'}
|
||||
:Send to Codepaster.Cancel_QPushButton {text='Cancel' type='QPushButton' unnamed='1' visible='1' window=':Send to Codepaster_CodePaster::PasteView'}
|
||||
:Send to Codepaster.Description:_QLabel {name='descriptionLabel' text='Description:' type='QLabel' visible='1' window=':Send to Codepaster_CodePaster::PasteView'}
|
||||
:Send to Codepaster.Paste_QPushButton {text='Paste' type='QPushButton' unnamed='1' visible='1' window=':Send to Codepaster_CodePaster::PasteView'}
|
||||
:Send to Codepaster.protocolBox_QComboBox {name='protocolBox' type='QComboBox' visible='1' window=':Send to Codepaster_CodePaster::PasteView'}
|
||||
:Send to Codepaster.stackedWidget_QStackedWidget {name='stackedWidget' type='QStackedWidget' visible='1' window=':Send to Codepaster_CodePaster::PasteView'}
|
||||
@@ -210,3 +211,4 @@
|
||||
:scrollArea_QTableView {type='QTableView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:sourceFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Source file:_QLabel' name='sourceFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'}
|
||||
:stackedWidget.plainTextEdit_QPlainTextEdit {container=':Send to Codepaster.stackedWidget_QStackedWidget' name='plainTextEdit' type='QPlainTextEdit' visible='1'}
|
||||
:uiDescription_QLineEdit {buddy=':Send to Codepaster.Description:_QLabel' name='uiDescription' type='QLineEdit' visible='1'}
|
||||
|
@@ -49,6 +49,9 @@ def main():
|
||||
selectFromCombo(":Send to Codepaster.protocolBox_QComboBox", protocol)
|
||||
pasteEditor = waitForObject(":stackedWidget.plainTextEdit_QPlainTextEdit")
|
||||
test.compare(pasteEditor.plainText, sourceText, "Verify that dialog shows text from the editor")
|
||||
description = "Description %s" % datetime.utcnow()
|
||||
if protocol != "Paste.KDE.Org": # QTCREATORBUG-11065
|
||||
type(waitForObject(":uiDescription_QLineEdit"), description)
|
||||
typeLines(pasteEditor, "// tst_codepasting %s" % datetime.utcnow())
|
||||
pastedText = pasteEditor.plainText
|
||||
clickButton(waitForObject(":Send to Codepaster.Paste_QPushButton"))
|
||||
@@ -72,6 +75,9 @@ def main():
|
||||
test.fail("Could not find id '%s' in list of pastes from %s" % (pasteId, protocol))
|
||||
clickButton(waitForObject(":CodePaster__Internal__PasteSelectDialog.Cancel_QPushButton"))
|
||||
continue
|
||||
if protocol == "Pastebin.Com":
|
||||
test.verify(description in pasteLine, "Verify that line in list of pastes contains the description")
|
||||
pasteLine = pasteLine.replace(".", "\\.")
|
||||
waitForObjectItem(":CodePaster__Internal__PasteSelectDialog.listWidget_QListWidget", pasteLine)
|
||||
clickItem(":CodePaster__Internal__PasteSelectDialog.listWidget_QListWidget", pasteLine, 5, 5, 0, Qt.LeftButton)
|
||||
clickButton(waitForObject(":CodePaster__Internal__PasteSelectDialog.OK_QPushButton"))
|
||||
|
Reference in New Issue
Block a user