This document contains testing scenarios for selenium system tests in EnMasse.

=== Scenarios for AddressTest
* testCreateDeleteQueue
- For brokered/standard address space try to create/delete queues with all available plans
- Brokered:
- Standard:

* testCreateDeleteTopic
- For brokered/standard address space try to create/delete topics with all available plans
- Brokered:
- Standard:

* testCreateDeleteAnycast
- For standard address space try to create/delete anycast with all available plans

* testCreateDeleteMulticast
- For standard address space try to create/delete multicast with all available plans

* testFilterAddressesByName
- Create 2 queues: queue-via-web-N where N=1,3
- Create 2 topics: topic-via-web-M where M=0,2
- add filter for “web” and verify that 4 items are visible
- add filter for “via” and verify that 4 items are visible
- Remove filter “web”
- verify that 4 items is visible
- add filter for “queue” and verify that 2 items is visible
- Remove all filters and verify that 4 items is visible
- Remove addresses

* testFilterAddressesByType
- Create 2 queues: queue-via-web-N where N=1,3
- Create 2 topics: topic-via-web-M where M=0,2
- Filter all queues and verify that 2 items are visible
- Filter all topics and verify that 2 items are visible
- Remove addresses

* testSortAddressesByName
- Create 2 queues: queue-via-web-N where N=1,3
- Create 2 topics: topic-via-web-M where M=0,2
- Sort those addresses by name(ASC/DESC) and verify order
- Remove addresses

* testSortAddressesByClients
- Create 2 queues: queue-via-web-N where N=1,3
- Create 2 topics: topic-via-web-M where M=0,2
- Attach M+1 consumer to each topic and N+1 consumer to each queue
- Sort addresses by count of receivers asc and verify order
- Sort addresses by count of receivers desc and verify order
- Kill receivers
- Create M+1 senders and start sending messages to each topic (1 messages per 1 second)
- Sort addresses by count of senders asc and verify order
- Sort addresses by count of senders desc and verify order
- Kill senders
- Remove addresses

=== Scenarios for ConnectionTest
test steps are TODO

* testSortConnectionsByClientID
* testSortConnectionsByHostname
- Create queue and topic: topic-via-web-0, queue-via-web-1
- Attach 3 clients to these addresses
- Change sort to Hostname asc and check order
- Change sort to Hostname desc and check order
- Remove addresses

* testSortConnectionsBySenders
- Create queue and topic: topic-via-web-0, queue-via-web-1
- Attach 3 clients with different count of producers to these addresses
- Change sort to Senders asc and check order
- Change sort to Senders desc and check order
- Remove addresses

* testSortConnectionsByReceivers
- Create queue and topic: topic-via-web-0, queue-via-web-1
- Attach 3 clients with different count of consumers to these addresses
- Change sort to Receivers asc and check order
- Change sort to Receivers desc and check order
- Remove addresses

* testFilterConnectionsByContainer
* testFilterConnectionsByHostname

* testFilterConnectionsByUser
- Create new user via API with username/password:pavel/enmasse
- Create queue: queue-via-web-connections-users
- Attach 5 consumer with user pavel
- Attach 10 consumers with default user: test/test
- Verify count of connections (15 expected)
- Add filter for username: "test"
- Verify count of connections and user names (10 expected)
- Add filter for username: "pavel"
- Verify count of connections and user names (should be empty)
- Remove filter with username "test"
- Verify count of connections and user names (5 expected)
- Clear all filters
- Verify count of connections (15 expected)
- Remove user "pavel"
- Remove queue

* testFilterConnectionsByEncrypted
- Create queue: queue-via-web-connections-encrypted
- Attach 5 consumers to this queue
- Add filter for encrypted and verify count
- Remove all filters
- Add filter for unencrypted and verify count
- Remove all filters
- Remove queue

* Scenarios for Authentication/AuthorizationTest.java
* Test for: Username right, password right (using popup login window)
* Test for: Username right, password wrong (using popup login window)
* Test for: Username wrong, password right (using popup login window)
* Test for: Username wrong, password wrong (using popup login window)
* Test for: Username right, password missing (using popup login window)
* Test for: Username missing, password right (using popup login window)
* Test for: Username missing, password missing (using popup login window)
* testLogoutUser *_this functionality isn't probably implemented at this moment_*

=== Scenarios for AddressSpaceTest
!TODO
