summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/extensions/BasicExtensionTest.java
Commit message (Expand)AuthorAgeFilesLines
* Updated copyright notices and added missing license headersArtur Signell2013-01-041-1/+1
* Refactor Extension API (#10337)Leif Åstrand2012-11-231-1/+1
* Rename WrappedXYZ -> VaadinXYZ but retain WrappedSession (#9633)Leif Åstrand2012-09-201-2/+2
* Renamed tests -> uitest and tests/testbench -> uitest/src (#9299)Artur Signell2012-08-301-0/+56
ption value='artonge/fix/use_loginname_to_check_password'>artonge/fix/use_loginname_to_check_password Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration/dav_features/carddav.feature
blob: 5b285dba2f84a8f56062289ccfb8d152284485e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
Feature: carddav
  Scenario: Accessing a not existing addressbook of another user
    Given user "user0" exists
    When "admin" requests addressbook "user0/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/"
    And The CardDAV exception is "Internal Server Error"

  Scenario: Accessing a not shared addressbook of another user
    Given user "user0" exists
    Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
    When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/"
    And The CardDAV exception is "Internal Server Error"

  Scenario: Accessing a not existing addressbook of another user via legacy endpoint
    Given user "user0" exists
    When "admin" requests addressbook "user0/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/carddav/addressbooks/"
    And The CardDAV exception is "Sabre\DAV\Exception\NotFound"
    And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found"

  Scenario: Accessing a not shared addressbook of another user via legacy endpoint
    Given user "user0" exists
    Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
    When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/carddav/addressbooks/"
    And The CardDAV exception is "Sabre\DAV\Exception\NotFound"
    And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found"

  Scenario: Accessing a not existing addressbook of myself
    Given user "user0" exists
    When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/"
    And The CardDAV exception is "Internal Server Error"

  Scenario: Creating a new addressbook
    When "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
    Then "admin" requests addressbook "admin/MyAddressbook" with statuscode "207" on the endpoint "/remote.php/dav/addressbooks/users/"

  Scenario: Accessing ones own contact
    Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
    Given "admin" uploads the contact "bjoern.vcf" to the addressbook "MyAddressbook"
    When Downloading the contact "bjoern.vcf" from addressbook "MyAddressbook" as user "admin"
    Then The following HTTP headers should be set
        |Content-Disposition|attachment; filename*=UTF-8''bjoern.vcf; filename="bjoern.vcf"|
        |Content-Type|text/vcard; charset=utf-8|
        |Content-Security-Policy|default-src 'none';|
        |X-Content-Type-Options |nosniff|
        |X-Frame-Options|SAMEORIGIN|
        |X-Permitted-Cross-Domain-Policies|none|
        |X-Robots-Tag|noindex, nofollow|
        |X-XSS-Protection|1; mode=block|

  Scenario: Exporting the picture of ones own contact
    Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
    Given "admin" uploads the contact "bjoern.vcf" to the addressbook "MyAddressbook"
    When Exporting the picture of contact "bjoern.vcf" from addressbook "MyAddressbook" as user "admin"
    Then The following HTTP headers should be set
      |Content-Disposition|attachment; filename=bjoern.vcf.jpg|
      |Content-Type|image/jpeg|
      |Content-Security-Policy|default-src 'none';|
      |X-Content-Type-Options |nosniff|
      |X-Frame-Options|SAMEORIGIN|
      |X-Permitted-Cross-Domain-Policies|none|
      |X-Robots-Tag|noindex, nofollow|
      |X-XSS-Protection|1; mode=block|

  Scenario: Create addressbook request for non-existing addressbook of another user
    Given user "user0" exists
    When "user0" sends a create addressbook request to "admin/MyAddressbook2" on the endpoint "/remote.php/dav/addressbooks/"
    Then The CardDAV HTTP status code should be "404"
    And The CardDAV exception is "Internal Server Error"

  Scenario: Create addressbook request for existing addressbook of another user
    Given user "user0" exists
    When "admin" creates an addressbook named "MyAddressbook2" with statuscode "201"
    When "user0" sends a create addressbook request to "admin/MyAddressbook2" on the endpoint "/remote.php/dav/addressbooks/"
    Then The CardDAV HTTP status code should be "404"
    And The CardDAV exception is "Internal Server Error"