Skip to content

[do not merge] Cut down testing to demonstrate UI test CSRF failed - #29028

Closed
phil-davis wants to merge 1 commit into
masterfrom
cut-down-travis-jenkins-ui-rename-feature
Closed

phil-davis wants to merge 1 commit into
masterfrom
cut-down-travis-jenkins-ui-rename-feature

Conversation

@phil-davis

Copy link
Copy Markdown
Contributor

This is cut-down test code to demonstrate an issue without needing hours of elapsed test run time.

  1. Travis is cut down to just run the 'files' UI test suite on chrome latest, chrome latest-1 and firefox.
  2. Jenkins is cut down to just run a bit of stuff so it only takes a few minutes to pass (Jenkins is not the issue here)
  3. The 'files' UI test suite is cut down to have just the renamefiles feature.
  4. The renamefiles feature is cut down to have just the 2 scenarios that demonstrate the issue.

@phil-davis phil-davis self-assigned this Sep 17, 2017
@phil-davis

phil-davis commented Sep 17, 2017 •

Copy link
Copy Markdown
Contributor Author

The UI test fail is:

Running tests on 'chrome' (latest) on Windows 10
Feature: renameFiles
  Background:                            # /home/travis/build/owncloud/core/tests/ui/features/files/renameFiles.feature:3
    Given a regular user exists          # FeatureContext::aRegularUserExists()
    And I am logged in as a regular user # FeatureContext::iAmLoggedInAsARegularUser()
    And I am on the files page           # FilesContext::iAmOnTheFilesPage()
  Scenario: Rename a file that has special characters in its name      # /home/travis/build/owncloud/core/tests/ui/features/files/renameFiles.feature:8
    When I rename the file "'single'quotes.txt" to "single-quotes.txt" # FilesContext::iRenameTheFileFolderTo()
    Then the file "single-quotes.txt" should be listed                 # FilesContext::theFileFolderShouldBeListed()
  Scenario: Rename a file using special characters and check its existence after page reload # /home/travis/build/owncloud/core/tests/ui/features/files/renameFiles.feature:12
    And I am on the files page                                                               # FilesContext::iAmOnTheFilesPage()
      exception 'SensioLabs\Behat\PageObjectExtension\PageObject\Exception\UnexpectedPageException' 
with message 'Expected to be on "http://owncloud:8889/index.php/apps/files/" but found "http://owncloud:8889/index.php/login?redirect_url=%252Findex.php%252Fapps%252Ffiles%252F" instead' 
in /home/travis/build/owncloud/core/tests/ui/features/lib/FilesPage.php:181

It happens in:

  • about 50% of the test runs on chrome latest (which is currently chrome 61)
  • much less frequently on chrome latest-1 (which is currently chrome 60) and now after many restarts of latest-1 it does not fail a all. Why is that???
    but I never see it happen on Firefox 47.0 runs.

It seems to be related to some browser state after:

    When I rename the file "'single'quotes.txt" to "single-quotes.txt"
    Then the file "single-quotes.txt" should be listed

If that scenario is changed to have a rename target higher (alphabetically) in the file list, then there is no problem:

    When I rename the file "'single'quotes.txt" to "a.txt"
    Then the file "a.txt" should be listed

]

@phil-davis phil-davis closed this Sep 18, 2017
@phil-davis
phil-davis deleted the cut-down-travis-jenkins-ui-rename-feature branch September 18, 2017 07:53
@phil-davis phil-davis mentioned this pull request Sep 18, 2017
@lock

lock Bot commented Aug 2, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants