Skip to content
This repository was archived by the owner on Nov 23, 2026. It is now read-only.

[Tests-Only] refactor tests for Shares folder: webuiResharing, webuiSharingAcceptShares - #4103

Merged
individual-it merged 1 commit into
masterfrom
refactor-sharing-tests-accept-shares
Sep 29, 2020
Merged

individual-it merged 1 commit into
masterfrom
refactor-sharing-tests-accept-shares

Conversation

@dpakach

@dpakach dpakach commented Sep 24, 2020 •

Copy link
Copy Markdown
Contributor

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 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"

@haribhandari07 haribhandari07 Sep 25, 2020 •

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.

accepts not accepted

Copy link
Copy Markdown
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
Copy Markdown
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 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
Copy Markdown
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 ee8e064 to e427c92 Compare September 28, 2020 12:37
@phil-davis

Copy link
Copy Markdown
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
Copy Markdown
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 requested a review from phil-davis September 29, 2020 05:51
@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
@dpakach
dpakach requested a review from phil-davis September 29, 2020 09:07
@phil-davis

Copy link
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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