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][full-ci] added test to list shares after disabling Editor role #11057

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PrajwolAmatya
Copy link
Contributor

@PrajwolAmatya PrajwolAmatya commented Feb 25, 2025

Description

This PR adds the test to share resource with Editor role, disabling the Editor role and users listing the shares.

Related Issue

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 only (no source changes)

Checklist:

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

@@ -715,3 +715,589 @@ Feature: enable disable permissions role
| Space Viewer | | a8d5fe5e-96e3-418d-825b-534dbdf22b99 |
| Space Editor | DNVCK | 58c63c02-1d89-4572-916a-870abc5a1b7d |
| Manager | RDNVCKZP | 312c0871-5ef7-4b3a-85b6-0e4074c64049 |


Scenario: users list the folder shares shared with Editor role after the role is disabled (Personal Space)
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens when role get disabled before sharing. Can we still share resource. Did we already cover such cases

Copy link
Contributor Author

@PrajwolAmatya PrajwolAmatya Feb 27, 2025

Choose a reason for hiding this comment

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

We get the following response

{
  "error": {
    "code": "invalidRequest",
    "innererror": {
      "date": "2025-02-27T05:42:33Z",
      "request-id": "<request-id>"
    },
    "message": "Key: 'DriveItemInvite.Roles' Error:Field validation for 'Roles' failed on the 'available_role' tag"
  }
}

We don't have test coverage for this case. I will add this case on a separate PR. 👍

And the administrator has disabled the permissions role "Editor"
When user "Alice" lists the shares shared by her using the Graph API
Then the HTTP status code should be "200"
And the JSON data of the response should contain resource "folderToShare" with the following data:
Copy link
Contributor

Choose a reason for hiding this comment

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

minimize json response

Copy link

sonarqubecloud bot commented Mar 4, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants