Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only] Enable GUI tests pipeline #10046

Merged
merged 9 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ OC_CI_CLIENT = "owncloudci/client:latest"
OC_CI_CORE = "owncloudci/core"
OC_CI_DRONE_CANCEL_PREVIOUS_BUILDS = "owncloudci/drone-cancel-previous-builds"
OC_CI_PHP = "owncloudci/php:%s"
OC_CI_SQUISH = "owncloudci/squish:6.7-20220106-1008-qt515x-linux64"

# Eventually, we have to use image built on ubuntu
# Todo: update or remove the following images
# https://github.com/owncloud/client/issues/10070
OC_CI_CLIENT_FEDORA = "owncloudci/client:fedora-36-amd64"
OC_CI_SQUISH = "owncloudci/squish:fedora-36-6.7-20220106-1008-qt515x-linux64"

OC_CI_TRANSIFEX = "owncloudci/transifex:latest"
OC_TEST_MIDDLEWARE = "owncloud/owncloud-test-middleware:1.6.0"
OC_UBUNTU = "owncloud/ubuntu:20.04"
Expand Down Expand Up @@ -71,10 +77,7 @@ def main(ctx):
trigger = cron_trigger,
)

# owncloudci/squish image is not working as expected
# Skipping GUI test pipeline until the following issue is resolved:
# https://github.com/owncloud-ci/squish/issues/34
gui_tests = [] # gui_test_pipeline(ctx, trigger = cron_trigger)
gui_tests = gui_test_pipeline(ctx, trigger = cron_trigger)
notify = notification(
name = "build",
trigger = cron_trigger,
Expand All @@ -85,11 +88,8 @@ def main(ctx):
gui_tests_format(build_trigger) + \
check_starlark(build_trigger) + \
changelog(ctx, trigger = build_trigger) + \
unit_test_pipeline(ctx, "clang", "clang++", "Debug", "Ninja", trigger = build_trigger)
# owncloudci/squish image is not working as expected
# Skipping GUI test pipeline until the following issue is resolved:
# https://github.com/owncloud-ci/squish/issues/34
# gui_test_pipeline(ctx, trigger = build_trigger, version = "latest")
unit_test_pipeline(ctx, "clang", "clang++", "Debug", "Ninja", trigger = build_trigger) + \
gui_test_pipeline(ctx, trigger = build_trigger, version = "latest")

return pipelines

Expand Down Expand Up @@ -186,6 +186,7 @@ def gui_test_pipeline(ctx, trigger = {}, filterTags = [], version = "daily-maste
build_config["generator"],
build_config["build_command"],
build_dir,
OC_CI_CLIENT_FEDORA,
) +
gui_tests(squish_parameters, [build_config["build_command"]]) +
# GUI test result has been disabled for now, as we squish can not produce the result in both html and json format.
Expand All @@ -206,11 +207,11 @@ def gui_test_pipeline(ctx, trigger = {}, filterTags = [], version = "daily-maste
],
}]

def build_client(c_compiler, cxx_compiler, build_type, generator, build_command, build_dir):
def build_client(c_compiler, cxx_compiler, build_type, generator, build_command, build_dir, image = OC_CI_CLIENT):
return [
{
"name": "generate",
"image": OC_CI_CLIENT,
"image": image,
"environment": {
"LC_ALL": "C.UTF-8",
},
Expand All @@ -222,7 +223,7 @@ def build_client(c_compiler, cxx_compiler, build_type, generator, build_command,
},
{
"name": build_command,
"image": OC_CI_CLIENT,
"image": image,
"environment": {
"LC_ALL": "C.UTF-8",
},
Expand Down
9 changes: 5 additions & 4 deletions test/gui/shared/scripts/names.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
qFileDialog_newFolderButton_QToolButton = {"name": "newFolderButton", "type": "QToolButton", "visible": 1, "window": qFileDialog_QFileDialog}
treeView_QExpandingLineEdit = {"columnIndex": 0, "container": stackedWidget_treeView_QTreeView, "rowIndex": 2, "type": "QExpandingLineEdit", "unnamed": 1, "visible": 1}
qFileDialog_Choose_QPushButton = {"text": "Choose", "type": "QPushButton", "unnamed": 1, "visible": 1, "window": qFileDialog_QFileDialog}
enter_Password_QInputDialog = {"type": "QInputDialog", "unnamed": 1, "visible": 1, "windowTitle": "Enter Password"}
enter_Password_Cancel_QPushButton = {"text": "Cancel", "type": "QPushButton", "unnamed": 1, "visible": 1, "window": enter_Password_QInputDialog}
settings_settingsdialog_toolbutton_admin_localhost_QToolButton = {"name": "settingsdialog_toolbutton_admin@localhost", "type": "QToolButton", "visible": 1, "window": settings_OCC_SettingsDialog}
settings_stack_QStackedWidget = {"name": "stack", "type": "QStackedWidget", "visible": 1, "window": settings_OCC_SettingsDialog}
stack_accountToolbox_QToolButton = {"container": settings_stack_QStackedWidget, "name": "_accountToolbox", "type": "QToolButton", "visible": 1}
Expand Down Expand Up @@ -97,7 +95,6 @@
settings_settingsdialog_toolbutton_Add_account_QToolButton = {"name": "settingsdialog_toolbutton_Add account", "type": "QToolButton", "visible": 1, "window": settings_OCC_SettingsDialog}
settings_settingsdialog_toolbutton_Activity_QToolButton = {"name": "settingsdialog_toolbutton_Activity", "type": "QToolButton", "visible": 1, "window": settings_OCC_SettingsDialog}
sharingDialog_Close_QPushButton = {"text": "Close", "type": "QPushButton", "unnamed": 1, "visible": 1, "window": sharingDialog_OCC_ShareDialog}
stack_Enable_experimental_placeholder_mode_QPushButton = {"container": settings_stack_QStackedWidget, "text": "Enable experimental placeholder mode", "type": "QPushButton", "unnamed": 1, "visible": 1}
disable_virtual_file_support_QMessageBox = {"type": "QMessageBox", "unnamed": 1, "visible": 1, "windowTitle": "Disable virtual file support?"}
disable_virtual_file_support_Disable_support_QPushButton = {"text": "Disable support", "type": "QPushButton", "unnamed": 1, "visible": 1, "window": disable_virtual_file_support_QMessageBox}
error_QMessageBox = {"type": "QMessageBox", "unnamed": 1, "visible": 1, "windowTitle": "Error"}
Expand Down Expand Up @@ -136,4 +133,8 @@
deselect_remote_folders_you_do_not_wish_to_synchronize_ownCloud_QModelIndex = {"column": 0, "container": add_Folder_Sync_Connection_Deselect_remote_folders_you_do_not_wish_to_synchronize_QTreeWidget, "text": "ownCloud", "type": "QModelIndex"}
syncModeGroupBox_useVfsRadioButton_QRadioButton = {"container": advancedConfigGroupBox_syncModeGroupBox_QGroupBox, "name": "useVfsRadioButton", "type": "QRadioButton", "visible": 1}
contentWidget_Enable_experimental_placeholder_mode_QPushButton = {"container": setupWizardWindow_contentWidget_QStackedWidget, "text": "Enable experimental placeholder mode", "type": "QPushButton", "unnamed": 1, "visible": 1}
contentWidget_Stay_safe_QPushButton = {"container": setupWizardWindow_contentWidget_QStackedWidget, "text": "Stay safe", "type": "QPushButton", "unnamed": 1, "visible": 1}
contentWidget_Stay_safe_QPushButton = {"container": setupWizardWindow_contentWidget_QStackedWidget, "text": "Stay safe", "type": "QPushButton", "unnamed": 1, "visible": 1}
loginRequiredDialog_OCC_LoginRequiredDialog = {"name": "LoginRequiredDialog", "type": "OCC::LoginRequiredDialog", "visible": 1}
loginRequiredDialog_contentWidget_QStackedWidget = {"name": "contentWidget", "type": "QStackedWidget", "visible": 1, "window": loginRequiredDialog_OCC_LoginRequiredDialog}
enable_experimental_feature_QMessageBox = {"type": "QMessageBox", "unnamed": 1, "visible": 1, "windowTitle": "Enable experimental feature?"}
enable_experimental_feature_Enable_experimental_placeholder_mode_QPushButton = {"text": "Enable experimental placeholder mode", "type": "QPushButton", "unnamed": 1, "visible": 1, "window": enable_experimental_feature_QMessageBox}
19 changes: 8 additions & 11 deletions test/gui/shared/scripts/pageObjects/EnterPassword.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,23 @@

class EnterPassword:
PASSWORD_BOX = {
"container": names.enter_Password_QInputDialog,
"container": names.loginRequiredDialog_contentWidget_QStackedWidget,
"name": "passwordLineEdit",
"type": "QLineEdit",
"unnamed": 1,
"visible": 1,
}
OK_BUTTON = {
"text": "OK",
LOGIN_BUTTON = {
"text": "Log in",
"type": "QPushButton",
"unnamed": 1,
"visible": 1,
"window": names.enter_Password_QInputDialog,
"window": names.loginRequiredDialog_OCC_LoginRequiredDialog,
}

def __init__(self):
pass

def enterPassword(self, password):
try:
squish.waitForObject(self.PASSWORD_BOX, 10000)
squish.type(squish.waitForObject(self.PASSWORD_BOX), password)
squish.clickButton(squish.waitForObject(self.OK_BUTTON))
except LookupError:
pass
squish.waitForObject(self.PASSWORD_BOX)
squish.type(squish.waitForObject(self.PASSWORD_BOX), password)
squish.clickButton(squish.waitForObject(self.LOGIN_BUTTON))
4 changes: 3 additions & 1 deletion test/gui/shared/steps/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,9 @@ def enableVFSSupport(vfsBtnText):
)
activateItem(waitForObjectItem(names.settings_QMenu, vfsBtnText))
clickButton(
waitForObject(names.stack_Enable_experimental_placeholder_mode_QPushButton)
waitForObject(
names.enable_experimental_feature_Enable_experimental_placeholder_mode_QPushButton
)
)


Expand Down
4 changes: 2 additions & 2 deletions test/gui/tst_addAccount/test.feature
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Feature: adding accounts
Then an account should be displayed with the displayname Alice Hansen and host %local_server_hostname%
And an account should be displayed with the displayname Brian Murphy and host %local_server_hostname%


@skip
saw-jan marked this conversation as resolved.
Show resolved Hide resolved
Scenario: Adding account with wrong credentials
Given the user has started the client
And the user has added the following server address:
Expand All @@ -37,7 +37,7 @@ Feature: adding accounts
| password | 12345 |
Then error "Login failed: username and/or password incorrect" should be displayed


@skip
saw-jan marked this conversation as resolved.
Show resolved Hide resolved
Scenario: Adding account with self signed certificate for the first time
Given the user has started the client
When the user adds the following server address:
Expand Down
1 change: 1 addition & 0 deletions test/gui/tst_vfs/test.feature
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@skip
saw-jan marked this conversation as resolved.
Show resolved Hide resolved
Feature: Enable/disable virtual file support

As a user
Expand Down