Skip to content

chore(ci): run acceptance tests in GitHub workflows#1237

Closed
phil-davis wants to merge 44 commits intomasterfrom
acceptance-tests-http-1
Closed

chore(ci): run acceptance tests in GitHub workflows#1237
phil-davis wants to merge 44 commits intomasterfrom
acceptance-tests-http-1

Conversation

@phil-davis
Copy link
Copy Markdown
Contributor

This is where I got up to earlier today, before I started trying to get it all to work with https

The drone pipelines did work without https being set up, so probably best to continue working here to debug why some acceptance tests are failing.

@phil-davis phil-davis force-pushed the acceptance-tests-http-1 branch 2 times, most recently from 5c29c2a to e4ba790 Compare April 13, 2026 04:34
This allows settings like:
AllowOverride All
to happen.

The final way to do this needs to be thought about,
bwecause we want to put the potential site conf files
somewhere that will be a common place for all app CI
to get them.
And there should be flexibility about the names "server"
and "federated".
When deleting files, the activity message about the delete is not
always at gthe top of the list. So the existing check sometimes
fails, but passes when the test scenario is run again.

So check for the expected activity message anywhere in the list,
it is not essential that it be right at the top.
@phil-davis phil-davis force-pushed the acceptance-tests-http-1 branch from e4ba790 to 1d1bf4a Compare April 13, 2026 04:53
@phil-davis phil-davis force-pushed the acceptance-tests-http-1 branch from 093b1f6 to f6501f6 Compare April 13, 2026 08:10
This is code from core for processing a trashbin restore.
It did not account for when the server is installed in a
subfolder, and the href of items has the subfolder at the front.
"/server/remote.php/dav/trash-bin/Alice/"

The code here is copied from core TrashbinContext and adjusted to
expect the subfolder at the front of the href.

If it works, then it will need to go in the core code.
@phil-davis phil-davis force-pushed the acceptance-tests-http-1 branch from f6501f6 to f3b134e Compare April 13, 2026 08:53
@phil-davis phil-davis force-pushed the acceptance-tests-http-1 branch from 4f959f1 to 59b77fa Compare April 14, 2026 04:56
The Apache site conf files are now stored in core
tests/acceptance/setupApache

And sort out the display of settings and log on failure()
@phil-davis phil-davis force-pushed the acceptance-tests-http-1 branch from 37088af to 1e8d102 Compare April 20, 2026 09:59
@phil-davis
Copy link
Copy Markdown
Contributor Author

webUIActivitySharingExternal/publicLinkSharingFederation.feature:8
passed a few commits ago, but on the retry:
https://github.com/owncloud/activity/actions/runs/24455471545/job/71454950256

When the public adds the public link to "%local_server%" as user "Brian" using the webUI        # WebUISharingContext::thePublicAddsThePublicLinkToUsingTheWebUI()
      element click intercepted: Element <a id="change-server" href="#">...</a> is not clickable at point (875, 73). Other element would receive the click: <a id="current-server" href="#">...</a>

But on the latest commit:
https://github.com/owncloud/activity/actions/runs/24660347349/job/72104570289?pr=1237

When the public adds the public link to "%local_server%" as user "Brian" using the webUI        # WebUISharingContext::thePublicAddsThePublicLinkToUsingTheWebUI()
      element not interactable
        (Session info: chrome=74.0.3729.169)
        (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Linux 6.17.0-1010-azure x86_64) (WebDriver\Exception\ElementNotVisible)

Need to understand what is happening, and why it used to sometimes pass.

@phil-davis
Copy link
Copy Markdown
Contributor Author

phil-davis commented Apr 20, 2026

owncloud log has multiple:

{"reqId":"0zVqhYrdijE2aSrEiTiq","level":3,"time":"2026-04-20T10:10:42+00:00","remoteAddr":"::1","user":"Brian","app":"PHP","method":"GET","url":"\/server\/apps\/activity\/api\/v2\/activity\/all?format=json&previews=true&since=0","message":"Array to string conversion at \/var\/www\/html\/server\/apps\/activity\/lib\/Formatter\/BaseFormatter.php#34"}

First investigate that.

Edit:
fixed that with some changes to the format/sanitizeHTML code so that it handles cases when there is an array of items to sanitize.

@phil-davis phil-davis force-pushed the acceptance-tests-http-1 branch 2 times, most recently from c4bb180 to 48fe26b Compare April 21, 2026 01:41
@phil-davis phil-davis force-pushed the acceptance-tests-http-1 branch from 48fe26b to da09667 Compare April 21, 2026 01:47
@phil-davis
Copy link
Copy Markdown
Contributor Author

Need to understand what is happening, and why it used to sometimes pass.

That webUI scenario passes locally for me, running the selenium-chrome docker image, watching the web interaction with vncviewer.

$ TEST_SERVER_URL=http://172.17.0.1/owncloud TEST_SERVER_FED_URL=http://172.17.0.1/federated BEHAT_FEATURE=tests/acceptance/features/webUIActivitySharingExternal/publicLinkSharingFederation.feature BROWSER=chrome make test-acceptance-webui
...
Feature: public link federation sharing file/folder activities
  As a user
  I want to be able to see history of the files and folders shared externally
  So that I know what happened in my cloud storage

  @issue-800
  Scenario: adding a server to the public link does not show activity for the receiver              # /home/phil/git/owncloud/core/apps-external/activity/tests/acceptance/features/webUIActivitySharingExternal/publicLinkSharingFederation.feature:8
    Given using server "REMOTE"                                                                     # FeatureContext::usingServer()
    And user "Alice" has been created with default attributes and without skeleton files            # FeatureContext::userHasBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles()
    And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt" # FeatureContext::userHasUploadedAFileWithContentTo()
    And user "Alice" has created a public link share of file "textfile0.txt"                        # FeatureContext::userHasCreatedAPublicLinkShareOf()
    And using server "LOCAL"                                                                        # FeatureContext::usingServer()
    And user "Brian" has been created with default attributes and without skeleton files            # FeatureContext::userHasBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles()
    And the public has accessed the last created public link using the webUI                        # WebUISharingContext::thePublicAccessesTheLastCreatedPublicLinkUsingTheWebUI()
    When the public adds the public link to "%local_server%" as user "Brian" using the webUI        # WebUISharingContext::thePublicAddsThePublicLinkToUsingTheWebUI()
      │ INFORMATION: thePublicAddsThePublicLinkToUsingTheWebUI calling loginAs at2026-04-21 09:08:09
      │ INFORMATION: finished waiting for LoginPage to load
      │              waiting for outstanding Ajax calls at 2026-04-21 09:08:10
      │              finished waiting for outstanding Ajax calls at 2026-04-21 09:08:10
      │ 
    And the user accepts the offered federated shares using the webUI                               # WebUISharingContext::theUserAcceptsTheOfferedFederatedShares()
    And the user browses to the activity page                                                       # WebUIActivityContext::userHasBrowsedToTheActivityPage()
    Then the activity should not have any message with keyword "shared"                             # WebUIActivityContext::theActivityShouldNotHaveAnyMessageWithKeyword()
SCENARIO RESULT: (pass)

1 scenario (1 passed)
11 steps (11 passed)
0m21.11s (24.27Mb)
runsh: Total 1 scenarios (1 passed, 0 failed)
runsh: Exit code of main run: 0

So there is something in the workflow environment/setup that is causing "element not interactable"

@phil-davis
Copy link
Copy Markdown
Contributor Author

Some days ago we had:
https://github.com/owncloud/activity/actions/runs/24455471545/job/71454950256

When the public adds the public link to "%local_server%" as user "Brian" using the webUI        # WebUISharingContext::thePublicAddsThePublicLinkToUsingTheWebUI()
      element click intercepted: Element <a id="change-server" href="#">...</a> is not clickable at point (875, 73). Other element would receive the click: <a id="current-server" href="#">...</a>

So there was a more detailed message, and the automatic rerun of the scenario passed. So the "other element" did not always obscure the needed UI element.

@phil-davis
Copy link
Copy Markdown
Contributor Author

See #1242 for the compressed version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant