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

[ocis][gui-test] Running GUI tests with oCIS server (using browser automation) #10261

Merged
merged 29 commits into from
Nov 18, 2022

Conversation

saw-jan
Copy link
Member

@saw-jan saw-jan commented Nov 10, 2022

Enable GUI test run with oCIS server.

oCIS server uses oidc to authorize the user which prevents Squish to handle user authorization process (squish cannot handle authorization via browser). This PR extends the Squish tests with Playwright (browser automation) so that the authorization via browser can be done in the tests.

Some tests are skipped for oCIS server due to UI difference or lack of functionality:

  • tst_addAccount: Scenario: Adding account with wrong credentials
  • tst_syncing: Scenario: Sync all is selected by default
  • tst_syncing: Scenario: Sync only one folder from the server
  • tst_syncing: Scenario: sort folders list by name and size
  • tst_syncing: Scenario Outline: File with long name (233 characters) is blacklisted
  • Sharing dialog for oCIS
    • tst_sharing: all

Related Issues

Closes #10262, #10249

GUI test reports

oCIS: https://cache.owncloud.com/public/owncloud/client/13727/ocis/guiReportUpload/index.html
oC10: https://cache.owncloud.com/public/owncloud/client/13727/oc10/guiReportUpload/index.html

Todo

  • separate GUI reports for oC10 and oCIS

Noticeable Changes

  • CI pipelines for oC10 and oCIS
    Screenshot from 2022-11-18 09-26-44

  • GitHub comment for each server
    Screenshot from 2022-11-18 10-08-57

  • Chat notification on failure (combined)
    Screenshot from 2022-11-18 10-08-28

@saw-jan saw-jan force-pushed the gui-test/run-with-ocis branch 2 times, most recently from 78266fd to a35f1ef Compare November 16, 2022 11:23
implement browser login for oCIS server

allow OCIS env var

move to helpers and POs

separate selector for basic and oauth page
use custom displaystring for ocis

make Personal as ocis default sync path
run headless browser

fix python style

bring back middleware host
refactor

cast string to bool

handle error

set browsers location
@saw-jan saw-jan force-pushed the gui-test/run-with-ocis branch 2 times, most recently from a46623e to 3c01059 Compare November 17, 2022 09:18
@ownclouders
Copy link
Contributor

ownclouders commented Nov 17, 2022

@saw-jan saw-jan marked this pull request as ready for review November 18, 2022 05:25
Copy link
Member

@individual-it individual-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well done ! 🚀
just some small comments

.drone.star Outdated Show resolved Hide resolved
.drone.star Outdated Show resolved Hide resolved
Comment on lines +88 to +96
# The account menu does not have its unique identifier
# So we are clicking at (718, 27) of "stack_folderList_QTreeView" object
item_text = "Personal" if context.userData['ocis'] else "ownCloud"
squish.mouseClick(
squish.waitForObjectItem(names.stack_folderList_QTreeView, item_text),
718,
27,
squish.Qt.NoModifier,
squish.Qt.LeftButton,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will be really an issue in the future, could you please open an issue, so that the developers could add a good identifier

@individual-it individual-it changed the title [poc][ocis][gui-test] Running GUI tests with oCIS server (using browser automation) [ocis][gui-test] Running GUI tests with oCIS server (using browser automation) Nov 18, 2022
Copy link
Contributor

@amrita-shrestha amrita-shrestha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only small thing other looks 🚀 🚀

.drone.star Outdated Show resolved Hide resolved
test/gui/config.sample.ini Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Nov 18, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@individual-it individual-it merged commit 8ac2458 into master Nov 18, 2022
@delete-merged-branch delete-merged-branch bot deleted the gui-test/run-with-ocis branch November 18, 2022 08:36
TheOneRing pushed a commit that referenced this pull request Nov 18, 2022
@individual-it individual-it mentioned this pull request Apr 21, 2023
89 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[QA] Cannot run Squish tests against oCIS server using basic auth
4 participants