Skip to content

UI tests - autocomplete sharing#27933

Merged
phil-davis merged 4 commits into
masterfrom
ui-test-autocomplete-sharing
Jun 15, 2017
Merged

UI tests - autocomplete sharing#27933
phil-davis merged 4 commits into
masterfrom
ui-test-autocomplete-sharing

Conversation

@individual-it

@individual-it individual-it commented May 18, 2017

Copy link
Copy Markdown
Member

Description

UI test to test the user autocompletion as per QA plan https://github.com/owncloud/QA/blob/master/Server/Test_Plan_Sharees.md

Related Issue

https://github.com/owncloud/QA/blob/master/Server/Test_Plan_Sharees.md

Motivation and Context

make Test plan run automatically
https://github.com/owncloud/QA/blob/master/Server/Test_Plan_Sharees.md

How Has This Been Tested?

run the tests in Chrome on local machine

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@phil-davis

Copy link
Copy Markdown
Contributor

I had a go at resolving the conflicts, but it is not happy yet. I will look again in a while...

@individual-it

Copy link
Copy Markdown
Member Author

this is branched off from the file renaming. Let's have the autocomplete stuff in here only

@individual-it individual-it changed the title UI test autocomplete sharing [WIP] UI test autocomplete sharing May 19, 2017
@individual-it individual-it force-pushed the ui-test-autocomplete-sharing branch 3 times, most recently from e8bc9d8 to 867cdad Compare May 26, 2017 11:21
@individual-it individual-it requested a review from phil-davis May 26, 2017 12:00
@individual-it individual-it changed the title [WIP] UI test autocomplete sharing UI tests - autocomplete sharing May 26, 2017
@individual-it individual-it force-pushed the ui-test-autocomplete-sharing branch from 867cdad to 1a52857 Compare May 30, 2017 12:07
@individual-it individual-it force-pushed the ui-test-autocomplete-sharing branch from fdc4a26 to 65a486e Compare May 31, 2017 03:14
@individual-it individual-it force-pushed the ui-test-autocomplete-sharing branch from 65a486e to 29c2e46 Compare May 31, 2017 15:29

@phil-davis phil-davis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think just little things that are not functional.
This code should work fine.

Comment thread tests/ui/features/lib/SharingDialog.php Outdated
protected $shareWithFieldXpath = ".//*[contains(@class,'shareWithField')]";
protected $shareWithTooltipXpath = "/..//*[@class='tooltip-inner']";
protected $shareWithAutocompleteListXpath = ".//ul[contains(@class,'ui-autocomplete')]";
protected $autocompleItemsTextXpath = "//*[@class='autocomplete-item-text']";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/autocompleItemsTextXpath/autocompleteItemsTextXpath
in all places

Then a tooltip with the text "No users or groups found for doesnotexist" should be shown near the share-with-field
And the autocomplete list should not be displayed

Scenario: autocompletion of a pattern that matches regular existing users but also a user whith whom the item is already shared (folder)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/whith/with
I don't think that scenario descriptions have to match any code, so this will have no other places to fix.

public function theFileFolderIsSharedWithTheUser($folder, $user)
{
$this->filesPage->waitTillPageIsloaded($this->getSession());
$this->sharingDialog= $this->filesPage->openSharingDialog(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No space before =
I guess these can be tidied up.

public function theShareDialogForTheFileFolderIsOpen($name)
{
$this->filesPage->waitTillPageIsloaded($this->getSession());
$this->sharingDialog= $this->filesPage->openSharingDialog(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No space before =

* @return SharingDialog
*/
public function openSharingDialog ($name, Session $session)
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess we be consistent and should put spaces before and after =

@individual-it

Copy link
Copy Markdown
Member Author

I feel this is now ready to go.
but what happens to jenkins?

@phil-davis

Copy link
Copy Markdown
Contributor

@DeepDiver1975 and others, as well as adding new tests this makes infrastructure for generally dealing with fields that have autocomplete. In the autocomplete case the underlying AJAX only starts when the user has stopped typing for "a bit". So we need to check in the testing that the AJAX has started and then finished before moving on to check that the desired matching item(s) is in the list. Thus there are new functions here to deal with that. The existing waiting loops have also been changed so that they wait more accurately only until the real requested timeout (the previous behaviour with the counter sometimes resulted in a total wait time much greater than asked for, which delayed test completion if timeout conditions happened much)

For some reason Jenkins seems to have never even tried to start.
Is it possible to just get Jenkins to start?

@phil-davis

Copy link
Copy Markdown
Contributor

Jenkins did its thing with this a while ago. Merging now.

@phil-davis phil-davis merged commit 0756e22 into master Jun 15, 2017
@phil-davis phil-davis deleted the ui-test-autocomplete-sharing branch June 15, 2017 15:47
@lock

lock Bot commented Aug 3, 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 3, 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