| --- RCPTT testcase --- |
| Format-Version: 1.0 |
| Element-Name: TestInvalidQueriesForAnonymous |
| Element-Type: testcase |
| Element-Version: 3.0 |
| External-Reference: |
| Id: _ubcSEGYjEeacLsYYjZ3eXQ |
| Runtime-Version: 2.1.0.201605312320 |
| Save-Time: 11/1/16 1:49 PM |
| Testcase-Type: ecl |
| |
| ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac |
| Content-Type: text/ecl |
| Entry-Name: .content |
| |
| // Add a server connected by an anonymous user and make it the default server |
| add-gerrit-server -serverURL $serverURL -serverName anonymous -userName "" |
| selectActiveServer -serverName anonymous |
| |
| // Enter a query that will fail |
| getDashboard | get-combo | set-text "owner:self" |
| |
| assert-dialog -named "Gerrit Server.*" -containsText "The query \"owner:self\" cannot be executed by anonymous users." |
| // |
| get-view "Gerrit Dashboard (EGerrit)" | get-button "Find my Changes reviews for the selected repository" | click -arrow |
| get-menu Changes | click |
| assert-dialog -named "Gerrit Server.*" -containsText "The query \"is:open AND (owner:self OR reviewer:self)\" cannot be executed by anonymous users." |
| |
| get-view "Gerrit Dashboard (EGerrit)" | get-button "Find my Changes reviews for the selected repository" | click -arrow |
| get-menu "Draft Comments" | click |
| assert-dialog -named "Gerrit Server.*" -containsText "The query \"has:draft\" cannot be executed by anonymous users." |
| |
| get-view "Gerrit Dashboard (EGerrit)" | get-button "Find my Changes reviews for the selected repository" | click -arrow |
| get-menu "Starred Changes" | click |
| assert-dialog -named "Gerrit Server.*" -containsText "The query \"is:starred status:open\" cannot be executed by anonymous users." |
| |
| |
| get-view "Gerrit Dashboard (EGerrit)" | get-button "Find my Changes reviews for the selected repository" | click -arrow |
| get-menu "Recently Closed Changes" | click |
| assert-dialog -named "Gerrit Server.*" -containsText "The query \"is:closed AND (owner:self OR reviewer:self) AND limit:10\" cannot be executed by anonymous users." |
| |
| |
| delete-gerrit-server -serverName anonymous |
| ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- |