<commit_before>@api @TestAlsoOnExternalUserBackend @files_sharing-app-required @issue-ocis-reva-47
Feature: sharing

  Background:
    Given using OCS API version "1"
    And these users have been created with default attributes and skeleton files:
      | username |
      | Alice    |
      | Brian    |

  @smokeTest @skipOnOcis @issue-ocis-reva-47
  Scenario Outline: Correct webdav share-permissions for owned file
    Given using <dav-path> DAV path
    And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
    When user "Alice" gets the following properties of file "/tmp.txt" using the WebDAV API
      | propertyName          |
      | ocs:share-permissions |
    Then the single response should contain a property "ocs:share-permissions" with value "19"
    Examples:
      | dav-path |
      | old      |
      | new      |

  @issue-ocis-reva-47 @skipOnOcV10
  #after fixing the issues delete this Scenario and use the one above
  Scenario Outline: Empty webdav share-permissions for owned file
    Given using <dav-path> DAV path
    And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
    When user "Alice" gets the following properties of file "/tmp.txt" using the WebDAV API
      | propertyName          |
      | ocs:share-permissions |
    Then the single response should contain a property "ocs:share-permissions" with value ""
    Examples:
      | dav-path |
      | old      |
      | new      |

  @skipOnOcis @issue-ocis-reva-243
  Scenario Outline: Correct webdav share-permissions for received file with edit and reshare permissions
    Given using <dav-path> DAV path
    And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
    And user "Alice" has shared file "/tmp.txt" with user "Brian"
    When user "Brian" gets the following properties of file "/tmp.txt" using the WebDAV API
      | propertyName          |
      | ocs:share-permissions |
    Then the single response should contain a property "ocs:share-permissions" with value "19"
    Examples:
      | dav-path |
      | old      |
      | new      |<commit_msg>update ocis test for ocs-share-permissions scenario<commit_after>@api @TestAlsoOnExternalUserBackend @files_sharing-app-required @issue-ocis-reva-47
Feature: sharing

  Background:
    Given using OCS API version "1"
    And these users have been created with default attributes and skeleton files:
      | username |
      | Alice    |
      | Brian    |

  @smokeTest @skipOnOcis @issue-ocis-reva-47
  Scenario Outline: Correct webdav share-permissions for owned file
    Given using <dav-path> DAV path
    And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
    When user "Alice" gets the following properties of file "/tmp.txt" using the WebDAV API
      | propertyName          |
      | ocs:share-permissions |
    Then the single response should contain a property "ocs:share-permissions" with value "19"
    Examples:
      | dav-path |
      | old      |
      | new      |

  @issue-ocis-reva-47 @skipOnOcV10
  #after fixing the issues delete this Scenario and use the one above
  Scenario Outline: Empty webdav share-permissions for owned file
    Given using <dav-path> DAV path
    And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
    When user "Alice" gets the following properties of file "/tmp.txt" using the WebDAV API
      | propertyName          |
      | ocs:share-permissions |
    Then the single response should contain a property "ocs:share-permissions" with value "5"
    Examples:
      | dav-path |
      | old      |
      | new      |

  @skipOnOcis @issue-ocis-reva-243
  Scenario Outline: Correct webdav share-permissions for received file with edit and reshare permissions
    Given using <dav-path> DAV path
    And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
    And user "Alice" has shared file "/tmp.txt" with user "Brian"
    When user "Brian" gets the following properties of file "/tmp.txt" using the WebDAV API
      | propertyName          |
      | ocs:share-permissions |
    Then the single response should contain a property "ocs:share-permissions" with value "19"
    Examples:
      | dav-path |
      | old      |
      | new      |
{'fraction_non_alphanumeric': 0.07839433293978748, 'fraction_numerical': 0.007792207792207792, 'mean_word_length': 2.683478260869565, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4558399', 'n_tokens_mistral': 1289, 'n_tokens_neox': 1215, 'n_words': 464}