<NME> password.feature
<BEF> Feature: callapi/password
  Background:
    Given user "participant1" exists
    And user "participant2" exists
    And user "participant3" exists

  Scenario: User has no rooms
    Then user "participant1" is participant of the following rooms (v4)
    Then user "participant2" is participant of the following rooms (v4)
    Then user "participant3" is participant of the following rooms (v4)

  Scenario: User1 invites user2 to a public room and they can do everything
    When user "participant1" creates room "room" (v4)
      | roomType | 3 |
      | roomName | room |
    And user "participant1" sets password "foobar" for room "room" with 200 (v4)
    And user "participant1" adds user "participant2" to room "room" with 200 (v4)
    Then user "participant1" is participant of room "room" (v4)
    And user "participant2" is participant of room "room" (v4)
    Then user "participant1" sees 0 peers in call "room" with 200 (v4)
    And user "participant2" sees 0 peers in call "room" with 200 (v4)
    Then user "participant1" joins room "room" with 200 (v4)
    Then user "participant1" sees 0 peers in call "room" with 200 (v4)
    And user "participant2" sees 0 peers in call "room" with 200 (v4)
    Then user "participant1" joins call "room" with 200 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "participant2" sees 1 peers in call "room" with 200 (v4)
    And user "participant2" joins room "room" with 200 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "participant2" sees 1 peers in call "room" with 200 (v4)
    And user "participant2" joins call "room" with 200 (v4)
    Then user "participant1" sees 2 peers in call "room" with 200 (v4)
    And user "participant2" sees 2 peers in call "room" with 200 (v4)
    Then user "participant1" leaves call "room" with 200 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "participant2" sees 1 peers in call "room" with 200 (v4)
    Then user "participant2" leaves call "room" with 200 (v4)
    Then user "participant1" sees 0 peers in call "room" with 200 (v4)
    And user "participant2" sees 0 peers in call "room" with 200 (v4)

  Scenario: User1 invites user2 to a public room and user3 can not join without password
    When user "participant1" creates room "room" (v4)
      | roomType | 3 |
      | roomName | room |
    And user "participant1" sets password "foobar" for room "room" with 200 (v4)
    And user "participant1" adds user "participant2" to room "room" with 200 (v4)
    Then user "participant1" is participant of room "room" (v4)
    Then user "participant3" is not participant of room "room" (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)
    Then user "participant1" joins room "room" with 200 (v4)
    Then user "participant1" sees 0 peers in call "room" with 200 (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)
    Then user "participant1" joins call "room" with 200 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)
    And user "participant3" joins room "room" with 403 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)
    And user "participant3" joins call "room" with 404 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)
    Then user "participant3" leaves call "room" with 404 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)
    Then user "participant3" leaves room "room" with 200 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)
    Then user "participant1" leaves call "room" with 200 (v4)
    Then user "participant1" sees 0 peers in call "room" with 200 (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)
    Then user "participant1" leaves room "room" with 200 (v4)
    Then user "participant1" sees 0 peers in call "room" with 200 (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)

  Scenario: User1 invites user2 to a public room and user3 can join with password
    When user "participant1" creates room "room" (v4)
      | roomType | 3 |
      | roomName | room |
    And user "participant1" sets password "foobar" for room "room" with 200 (v4)
    And user "participant1" adds user "participant2" to room "room" with 200 (v4)
    Then user "participant1" is participant of room "room" (v4)
    Then user "participant3" is not participant of room "room" (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)
    Then user "participant1" joins room "room" with 200 (v4)
    Then user "participant1" sees 0 peers in call "room" with 200 (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)
    Then user "participant1" joins call "room" with 200 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)
    And user "participant3" joins room "room" with 200 (v4)
      | password | foobar |
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "participant3" sees 1 peers in call "room" with 200 (v4)
    And user "participant3" joins call "room" with 200 (v4)
    Then user "participant1" sees 2 peers in call "room" with 200 (v4)
    And user "participant3" sees 2 peers in call "room" with 200 (v4)
    Then user "participant3" leaves call "room" with 200 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "participant3" sees 1 peers in call "room" with 200 (v4)
    Then user "participant3" leaves room "room" with 200 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)
    Then user "participant1" leaves call "room" with 200 (v4)
    Then user "participant1" sees 0 peers in call "room" with 200 (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)
    Then user "participant1" leaves room "room" with 200 (v4)
    Then user "participant1" sees 0 peers in call "room" with 200 (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)

  Scenario: User1 invites user2 to a public room and guest can not join without password
    When user "participant1" creates room "room" (v4)
      | roomType | 3 |
      | roomName | room |
    And user "participant1" sets password "foobar" for room "room" with 200 (v4)
    And user "participant1" adds user "participant2" to room "room" with 200 (v4)
    Then user "participant1" is participant of room "room" (v4)
    And user "guest" sees 0 peers in call "room" with 404 (v4)
    Then user "participant1" joins room "room" with 200 (v4)
    Then user "participant1" sees 0 peers in call "room" with 200 (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)
    Then user "participant1" joins call "room" with 200 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "guest" sees 0 peers in call "room" with 404 (v4)
    And user "guest" joins room "room" with 403 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "guest" sees 0 peers in call "room" with 404 (v4)
    And user "guest" joins call "room" with 404
    Then user "participant1" sees 1 peers in call "room" with 200
    And user "guest" sees 0 peers in call "room" with 404
    Then user "guest" leaves call "room" with 200
    Then user "participant1" sees 1 peers in call "room" with 200
    And user "guest" sees 0 peers in call "room" with 404
    Then user "participant1" leaves call "room" with 200
    Then user "participant1" sees 0 peers in call "room" with 200 (v4)
    And user "guest" sees 0 peers in call "room" with 404 (v4)

  Scenario: User1 invites user2 to a public room and guest can join with password
    When user "participant1" creates room "room" (v4)
      | roomType | 3 |
      | roomName | room |
    And user "participant1" sets password "foobar" for room "room" with 200 (v4)
    And user "participant1" adds user "participant2" to room "room" with 200 (v4)
    Then user "participant1" is participant of room "room" (v4)
    And user "guest" sees 0 peers in call "room" with 404 (v4)
    Then user "participant1" joins room "room" with 200 (v4)
    Then user "participant1" sees 0 peers in call "room" with 200 (v4)
    And user "participant3" sees 0 peers in call "room" with 404 (v4)
    Then user "participant1" joins call "room" with 200 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "guest" sees 0 peers in call "room" with 404 (v4)
    And user "guest" joins room "room" with 200 (v4)
      | password | foobar |
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "guest" sees 1 peers in call "room" with 200 (v4)
    And user "guest" joins call "room" with 200 (v4)
    Then user "participant1" sees 2 peers in call "room" with 200 (v4)
    And user "guest" sees 2 peers in call "room" with 200 (v4)
    Then user "guest" leaves call "room" with 200 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "guest" sees 1 peers in call "room" with 200 (v4)
    Then user "guest" leaves room "room" with 200 (v4)
    Then user "participant1" sees 1 peers in call "room" with 200 (v4)
    And user "guest" sees 0 peers in call "room" with 404 (v4)
    Then user "participant1" leaves call "room" with 200 (v4)
    Then user "participant1" sees 0 peers in call "room" with 200 (v4)
    And user "guest" sees 0 peers in call "room" with 404 (v4)
    Then user "participant1" leaves room "room" with 200 (v4)
    Then user "participant1" sees 0 peers in call "room" with 200 (v4)
    And user "guest" sees 0 peers in call "room" with 404 (v4)

<MSG> Fix tests

Signed-off-by: Joas Schilling <ab43a7c9cb5b2380afc4ddf8b3e2583169b39a02@schilljs.com>

<DFF> @@ -127,7 +127,7 @@ Feature: callapi/public
     And user "guest" joins call "room" with 404
     Then user "participant1" sees 1 peers in call "room" with 200
     And user "guest" sees 0 peers in call "room" with 404
-    Then user "guest" leaves call "room" with 200
+    Then user "guest" leaves call "room" with 404
     Then user "participant1" sees 1 peers in call "room" with 200
     And user "guest" sees 0 peers in call "room" with 404
     Then user "participant1" leaves call "room" with 200

{'commit': 'diff --git a/tests/integration/features/callapi/password.feature b/tests/integration/features/callapi/password.feature\nindex a96f4d857..9f6dfe65e 100644\n--- a/tests/integration/features/callapi/password.feature\n+++ b/tests/integration/features/callapi/password.feature\n@@ -127,7 +127,7 @@ Feature: callapi/public\n     And user "guest" joins call "room" with 404\n     Then user "participant1" sees 1 peers in call "room" with 200\n     And user "guest" sees 0 peers in call "room" with 404\n-    Then user "guest" leaves call "room" with 200\n+    Then user "guest" leaves call "room" with 404\n     Then user "participant1" sees 1 peers in call "room" with 200\n     And user "guest" sees 0 peers in call "room" with 404\n     Then user "participant1" leaves call "room" with 200\ndiff --git a/tests/php/PasswordVerificationTest.php b/tests/php/PasswordVerificationTest.php\nindex a31a8309f..971427985 100644\n--- a/tests/php/PasswordVerificationTest.php\n+++ b/tests/php/PasswordVerificationTest.php\n@@ -55,6 +55,7 @@ class PasswordVerificationTest extends TestCase {\n \t\t\t$hasher,\n \t\t\t1,\n \t\t\tRoom::PUBLIC_CALL,\n+\t\t\tRoom::READ_WRITE,\n \t\t\t\'foobar\',\n \t\t\t\'Test\',\n \t\t\t\'passy\',\n', 'commit_subject': 'Fix tests', 'repo_name': 'nextcloud/spreed', 'committer': {'name': 'Joas Schilling', 'email': 'ab43a7c9cb5b2380afc4ddf8b3e2583169b39a02@schilljs.com', 'time_sec': '1553523441', 'tz_offset': '60', 'date': {'seconds': '1553523441'}}, 'commit_tree': '78a95cd385ae9e532b5743cb2d4ea23b37986d4c', 'commit_message': 'Fix tests\n\nSigned-off-by: Joas Schilling <ab43a7c9cb5b2380afc4ddf8b3e2583169b39a02@schilljs.com>\n', 'language_name': 'JavaScript', 'license': 'agpl-3.0', 'hunks': '@@ -127,7 +127,7 @@ Feature: callapi/public\n     And user "guest" joins call "room" with 404\n     Then user "participant1" sees 1 peers in call "room" with 200\n     And user "guest" sees 0 peers in call "room" with 404\n-    Then user "guest" leaves call "room" with 200\n+    Then user "guest" leaves call "room" with 404\n     Then user "participant1" sees 1 peers in call "room" with 200\n     And user "guest" sees 0 peers in call "room" with 404\n     Then user "participant1" leaves call "room" with 200\n', 'addition_count': 1, 'deletion_count': 1, 'src_file': 'a/tests/integration/features/callapi/password.feature', 'tgt_file': 'b/tests/integration/features/callapi/password.feature', 'file_extension': '.feature', 'before_file': 'Feature: callapi/password\n  Background:\n    Given user "participant1" exists\n    And user "participant2" exists\n    And user "participant3" exists\n\n  Scenario: User has no rooms\n    Then user "participant1" is participant of the following rooms (v4)\n    Then user "participant2" is participant of the following rooms (v4)\n    Then user "participant3" is participant of the following rooms (v4)\n\n  Scenario: User1 invites user2 to a public room and they can do everything\n    When user "participant1" creates room "room" (v4)\n      | roomType | 3 |\n      | roomName | room |\n    And user "participant1" sets password "foobar" for room "room" with 200 (v4)\n    And user "participant1" adds user "participant2" to room "room" with 200 (v4)\n    Then user "participant1" is participant of room "room" (v4)\n    And user "participant2" is participant of room "room" (v4)\n    Then user "participant1" sees 0 peers in call "room" with 200 (v4)\n    And user "participant2" sees 0 peers in call "room" with 200 (v4)\n    Then user "participant1" joins room "room" with 200 (v4)\n    Then user "participant1" sees 0 peers in call "room" with 200 (v4)\n    And user "participant2" sees 0 peers in call "room" with 200 (v4)\n    Then user "participant1" joins call "room" with 200 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "participant2" sees 1 peers in call "room" with 200 (v4)\n    And user "participant2" joins room "room" with 200 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "participant2" sees 1 peers in call "room" with 200 (v4)\n    And user "participant2" joins call "room" with 200 (v4)\n    Then user "participant1" sees 2 peers in call "room" with 200 (v4)\n    And user "participant2" sees 2 peers in call "room" with 200 (v4)\n    Then user "participant1" leaves call "room" with 200 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "participant2" sees 1 peers in call "room" with 200 (v4)\n    Then user "participant2" leaves call "room" with 200 (v4)\n    Then user "participant1" sees 0 peers in call "room" with 200 (v4)\n    And user "participant2" sees 0 peers in call "room" with 200 (v4)\n\n  Scenario: User1 invites user2 to a public room and user3 can not join without password\n    When user "participant1" creates room "room" (v4)\n      | roomType | 3 |\n      | roomName | room |\n    And user "participant1" sets password "foobar" for room "room" with 200 (v4)\n    And user "participant1" adds user "participant2" to room "room" with 200 (v4)\n    Then user "participant1" is participant of room "room" (v4)\n    Then user "participant3" is not participant of room "room" (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant1" joins room "room" with 200 (v4)\n    Then user "participant1" sees 0 peers in call "room" with 200 (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant1" joins call "room" with 200 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n    And user "participant3" joins room "room" with 403 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n    And user "participant3" joins call "room" with 404 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant3" leaves call "room" with 404 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant3" leaves room "room" with 200 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant1" leaves call "room" with 200 (v4)\n    Then user "participant1" sees 0 peers in call "room" with 200 (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant1" leaves room "room" with 200 (v4)\n    Then user "participant1" sees 0 peers in call "room" with 200 (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n\n  Scenario: User1 invites user2 to a public room and user3 can join with password\n    When user "participant1" creates room "room" (v4)\n      | roomType | 3 |\n      | roomName | room |\n    And user "participant1" sets password "foobar" for room "room" with 200 (v4)\n    And user "participant1" adds user "participant2" to room "room" with 200 (v4)\n    Then user "participant1" is participant of room "room" (v4)\n    Then user "participant3" is not participant of room "room" (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant1" joins room "room" with 200 (v4)\n    Then user "participant1" sees 0 peers in call "room" with 200 (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant1" joins call "room" with 200 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n    And user "participant3" joins room "room" with 200 (v4)\n      | password | foobar |\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "participant3" sees 1 peers in call "room" with 200 (v4)\n    And user "participant3" joins call "room" with 200 (v4)\n    Then user "participant1" sees 2 peers in call "room" with 200 (v4)\n    And user "participant3" sees 2 peers in call "room" with 200 (v4)\n    Then user "participant3" leaves call "room" with 200 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "participant3" sees 1 peers in call "room" with 200 (v4)\n    Then user "participant3" leaves room "room" with 200 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant1" leaves call "room" with 200 (v4)\n    Then user "participant1" sees 0 peers in call "room" with 200 (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant1" leaves room "room" with 200 (v4)\n    Then user "participant1" sees 0 peers in call "room" with 200 (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n\n  Scenario: User1 invites user2 to a public room and guest can not join without password\n    When user "participant1" creates room "room" (v4)\n      | roomType | 3 |\n      | roomName | room |\n    And user "participant1" sets password "foobar" for room "room" with 200 (v4)\n    And user "participant1" adds user "participant2" to room "room" with 200 (v4)\n    Then user "participant1" is participant of room "room" (v4)\n    And user "guest" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant1" joins room "room" with 200 (v4)\n    Then user "participant1" sees 0 peers in call "room" with 200 (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant1" joins call "room" with 200 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "guest" sees 0 peers in call "room" with 404 (v4)\n    And user "guest" joins room "room" with 403 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "guest" sees 0 peers in call "room" with 404 (v4)\n    And user "guest" joins call "room" with 404\n    Then user "participant1" sees 1 peers in call "room" with 200\n    And user "guest" sees 0 peers in call "room" with 404\n    Then user "guest" leaves call "room" with 200\n    Then user "participant1" sees 1 peers in call "room" with 200\n    And user "guest" sees 0 peers in call "room" with 404\n    Then user "participant1" leaves call "room" with 200\n    Then user "participant1" sees 0 peers in call "room" with 200 (v4)\n    And user "guest" sees 0 peers in call "room" with 404 (v4)\n\n  Scenario: User1 invites user2 to a public room and guest can join with password\n    When user "participant1" creates room "room" (v4)\n      | roomType | 3 |\n      | roomName | room |\n    And user "participant1" sets password "foobar" for room "room" with 200 (v4)\n    And user "participant1" adds user "participant2" to room "room" with 200 (v4)\n    Then user "participant1" is participant of room "room" (v4)\n    And user "guest" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant1" joins room "room" with 200 (v4)\n    Then user "participant1" sees 0 peers in call "room" with 200 (v4)\n    And user "participant3" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant1" joins call "room" with 200 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "guest" sees 0 peers in call "room" with 404 (v4)\n    And user "guest" joins room "room" with 200 (v4)\n      | password | foobar |\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "guest" sees 1 peers in call "room" with 200 (v4)\n    And user "guest" joins call "room" with 200 (v4)\n    Then user "participant1" sees 2 peers in call "room" with 200 (v4)\n    And user "guest" sees 2 peers in call "room" with 200 (v4)\n    Then user "guest" leaves call "room" with 200 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "guest" sees 1 peers in call "room" with 200 (v4)\n    Then user "guest" leaves room "room" with 200 (v4)\n    Then user "participant1" sees 1 peers in call "room" with 200 (v4)\n    And user "guest" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant1" leaves call "room" with 200 (v4)\n    Then user "participant1" sees 0 peers in call "room" with 200 (v4)\n    And user "guest" sees 0 peers in call "room" with 404 (v4)\n    Then user "participant1" leaves room "room" with 200 (v4)\n    Then user "participant1" sees 0 peers in call "room" with 200 (v4)\n    And user "guest" sees 0 peers in call "room" with 404 (v4)\n', 'message': 'Fix tests\n\nSigned-off-by: Joas Schilling <ab43a7c9cb5b2380afc4ddf8b3e2583169b39a02@schilljs.com>\n', 'author_name': 'Joas Schilling', 'lang': 'feature'}