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] refactor tests for Shares folder: webuiResharing, webuiSharingAcceptShares #4103

Merged
merged 1 commit into from
Sep 29, 2020

Conversation

dpakach
Copy link
Contributor

@dpakach dpakach commented Sep 24, 2020

Description

Refactor webui test scenarios for using the Shares folder and root folder for shares.

Related Issue

Motivation and Context

Shares in ocis are received in Shares folder by default. To test that we need this refactor.

How Has This Been Tested?

🤖

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)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • ...

@dpakach dpakach force-pushed the refactor-sharing-tests-accept-shares branch 2 times, most recently from 47c4a14 to 88a3f49 Compare September 24, 2020 14:32
@dpakach dpakach marked this pull request as ready for review September 25, 2020 03:29
@dpakach dpakach self-assigned this Sep 25, 2020
@dpakach dpakach mentioned this pull request Sep 25, 2020
2 tasks
And the user re-logs in as "user2" using the webUI
Then user "User One" should be listed as "Advanced permissions" in the collaborators list for folder "simple-folder" on the webUI
And custom permissions "share, delete" should be set for user "User One" for folder "simple-folder" on the webUI
And user "User Three" should be listed as "Advanced permissions" in the collaborators list for folder "simple-folder" on the webUI
And custom permissions "delete" should be set for user "User Three" for folder "simple-folder" on the webUI
When user "user3" has accepted the share "simple-folder" offered by user "user1"
Copy link
Contributor

@haribhandari07 haribhandari07 Sep 25, 2020

Choose a reason for hiding this comment

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

accepts not accepted

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an API step. I don't think we should use API steps on When steps for UI tests.
So I figured it would be better to consider this as a Given step for checking the next condition so. So I reused an existing given step.

@phil-davis need your opinion on this.

Copy link
Member

Choose a reason for hiding this comment

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

I think I would stay in the format and make a correct When step out of it When user "user3" accepty the share "simple-folder" offered by user "user1" using the API
and also I suggest to move it further up to the other WHEN steps

@dpakach dpakach force-pushed the refactor-sharing-tests-accept-shares branch from 88a3f49 to ee8e064 Compare September 25, 2020 08:18
And the user re-logs in as "user2" using the webUI
Then user "User One" should be listed as "Advanced permissions" in the collaborators list for folder "simple-folder" on the webUI
And custom permissions "share, delete" should be set for user "User One" for folder "simple-folder" on the webUI
And user "User Three" should be listed as "Advanced permissions" in the collaborators list for folder "simple-folder" on the webUI
And custom permissions "delete" should be set for user "User Three" for folder "simple-folder" on the webUI
When user "user3" has accepted the share "simple-folder" offered by user "user1"
Copy link
Member

Choose a reason for hiding this comment

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

I think I would stay in the format and make a correct When step out of it When user "user3" accepty the share "simple-folder" offered by user "user1" using the API
and also I suggest to move it further up to the other WHEN steps

@phil-davis
Copy link
Contributor

https://drone.owncloud.com/owncloud/phoenix/11155/27/19

    Then folder "simple-folder" shared by "User One" should be in "Declined" state on the webUI
waiting for 500ms ...
    When the user browses to the files page
Timed out while waiting for element <//button[@id="new-file-menu-btn" and contains(@class, "uk-button-primary")]> to be present for 20000 milliseconds. - expected "found" but got: "not found" (20020ms)
undefined√ Element <//div[contains(@class, "oc-file") and @data-preview-loaded="false"]> was not present after 16 milliseconds.
    Then folder "/Shares" should not be listed on the webUI
√ Element <#files-list, #shared-with-list> was visible after 56 milliseconds.
√ Element <//*[contains(@class, "oc-loader")]> was not present after 24 milliseconds.
√ Passed [ok]: Error: Resource /Shares is listed on the filesList

  Result: passed

That looks really strange - the step checks that folder "/Shares" should not be listed on the webUI and reports Error: Resource /Shares is listed on the filesList but the test scenario gets Result: passed

What???

@individual-it
Copy link
Member

https://drone.owncloud.com/owncloud/phoenix/11155/27/19
...
That looks really strange - the step checks that folder "/Shares" should not be listed on the webUI and reports Error: Resource /Shares is listed on the filesList but the test scenario gets Result: passed

I think that outputs the potential error but says the assertion passed

https://github.com/owncloud/phoenix/blob/abce2ae2384c814c74de4efb65adc2c92244e08d/tests/acceptance/stepDefinitions/filesContext.js#L414

maybe we have to adjust the messages in the asserts

@dpakach dpakach force-pushed the refactor-sharing-tests-accept-shares branch 2 times, most recently from bbaf870 to 645853c Compare September 29, 2020 05:50
@dpakach dpakach force-pushed the refactor-sharing-tests-accept-shares branch 2 times, most recently from d483381 to e9bce08 Compare September 29, 2020 07:35
@dpakach dpakach force-pushed the refactor-sharing-tests-accept-shares branch from e9bce08 to 31a3585 Compare September 29, 2020 09:06
@phil-davis
Copy link
Contributor

https://drone.owncloud.com/owncloud/phoenix/11155/27/19
...
That looks really strange - the step checks that folder "/Shares" should not be listed on the webUI and reports Error: Resource /Shares is listed on the filesList but the test scenario gets Result: passed

I think that outputs the potential error but says the assertion passed

https://github.com/owncloud/phoenix/blob/abce2ae2384c814c74de4efb65adc2c92244e08d/tests/acceptance/stepDefinitions/filesContext.js#L414

maybe we have to adjust the messages in the asserts

I raised issue #4115 so we can look into it some day.

@individual-it individual-it merged commit ba4e303 into master Sep 29, 2020
@delete-merged-branch delete-merged-branch bot deleted the refactor-sharing-tests-accept-shares branch September 29, 2020 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA:team Status:Needs-Review Needs review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enable sharing tests
4 participants