aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/resources/authorisation
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/test/resources/authorisation')
-rw-r--r--tests/src/test/resources/authorisation/PermissionTemplatesPageTest/should_create.html99
-rw-r--r--tests/src/test/resources/authorisation/PermissionTemplatesPageTest/should_display_page.html89
-rw-r--r--tests/src/test/resources/authorisation/PermissionTemplatesPageTest/should_manage_project_creators.html109
-rw-r--r--tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-be-able-to-provision-project.html59
-rw-r--r--tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-not-be-able-to-provision-project.html59
-rw-r--r--tests/src/test/resources/authorisation/QualityProfileAdminPermissionTest/normal-user.html69
-rw-r--r--tests/src/test/resources/authorisation/QualityProfileAdminPermissionTest/profile-admin.html84
-rw-r--r--tests/src/test/resources/authorisation/one-issue-per-line-profile.xml12
8 files changed, 580 insertions, 0 deletions
diff --git a/tests/src/test/resources/authorisation/PermissionTemplatesPageTest/should_create.html b/tests/src/test/resources/authorisation/PermissionTemplatesPageTest/should_create.html
new file mode 100644
index 00000000000..0e67e0f4fab
--- /dev/null
+++ b/tests/src/test/resources/authorisation/PermissionTemplatesPageTest/should_create.html
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>should_create</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sessions/logout</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/sessions/new</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>password</td>
+ <td>root-user</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>login</td>
+ <td>root-user</td>
+ </tr>
+ <tr>
+ <td>clickAndWait</td>
+ <td>name=commit</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/permission_templates</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=.page-actions button</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>click</td>
+ <td>css=.page-actions button</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=#permission-template-name</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>css=#permission-template-name</td>
+ <td>Custom</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>css=#permission-template-description</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>css=#permission-template-project-key-pattern</td>
+ <td>.*</td>
+ </tr>
+ <tr>
+ <td>click</td>
+ <td>css=#permission-template-submit</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=tr[data-name=&quot;Custom&quot;]</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>assertText</td>
+ <td>css=tr[data-name=&quot;Custom&quot;] .js-name</td>
+ <td>*Custom*</td>
+ </tr>
+ <tr>
+ <td>assertText</td>
+ <td>css=tr[data-name=&quot;Custom&quot;] .js-description</td>
+ <td>*Description*</td>
+ </tr>
+ <tr>
+ <td>assertText</td>
+ <td>css=tr[data-name=&quot;Custom&quot;] .js-project-key-pattern</td>
+ <td>*.*</td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/tests/src/test/resources/authorisation/PermissionTemplatesPageTest/should_display_page.html b/tests/src/test/resources/authorisation/PermissionTemplatesPageTest/should_display_page.html
new file mode 100644
index 00000000000..8d9640f25b6
--- /dev/null
+++ b/tests/src/test/resources/authorisation/PermissionTemplatesPageTest/should_display_page.html
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>should_display_page</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sessions/logout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/sessions/new</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>login</td>
+ <td>admin</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>admin</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>commit</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/permission_templates</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>css=tr[data-id=&quot;default_template&quot;]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>css=tr[data-id=&quot;default_template&quot;] .js-name</td>
+ <td>*Default template*</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>css=tr[data-id=&quot;default_template&quot;] .js-defaults</td>
+ <td>*Projects*</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>css=tr[data-id=&quot;default_template&quot;] .js-description</td>
+ <td>*This permission template will be used*</td>
+</tr>
+<tr>
+ <td>assertElementPresent</td>
+ <td>css=td[data-permission=&quot;user&quot;]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementPresent</td>
+ <td>css=td[data-permission=&quot;codeviewer&quot;]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementPresent</td>
+ <td>css=td[data-permission=&quot;issueadmin&quot;]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementPresent</td>
+ <td>css=td[data-permission=&quot;admin&quot;]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementPresent</td>
+ <td>css=td[data-permission=&quot;scan&quot;]</td>
+ <td></td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/tests/src/test/resources/authorisation/PermissionTemplatesPageTest/should_manage_project_creators.html b/tests/src/test/resources/authorisation/PermissionTemplatesPageTest/should_manage_project_creators.html
new file mode 100644
index 00000000000..3d1c172a783
--- /dev/null
+++ b/tests/src/test/resources/authorisation/PermissionTemplatesPageTest/should_manage_project_creators.html
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>should_manage_project_creators</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sessions/logout</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/sessions/new</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>password</td>
+ <td>admin-user</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>login</td>
+ <td>admin-user</td>
+ </tr>
+ <tr>
+ <td>clickAndWait</td>
+ <td>name=commit</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/permission_templates</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=td[data-permission=&quot;user&quot;]</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>click</td>
+ <td>css=td[data-permission=&quot;user&quot;] .js-update-users</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=#grant-to-project-creators</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>assertElementPresent</td>
+ <td>css=#grant-to-project-creators:not(:checked)</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>click</td>
+ <td>css=#grant-to-project-creators</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>click</td>
+ <td>css=.js-modal-close</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=td[data-permission=&quot;user&quot;] .js-project-creators</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>click</td>
+ <td>css=td[data-permission=&quot;user&quot;] .js-update-users</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=#grant-to-project-creators</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>assertElementPresent</td>
+ <td>css=#grant-to-project-creators:checked</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>click</td>
+ <td>css=#grant-to-project-creators</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>click</td>
+ <td>css=.js-modal-close</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementNotPresent</td>
+ <td>css=td[data-permission=&quot;user&quot;] .js-project-creators</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-be-able-to-provision-project.html b/tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-be-able-to-provision-project.html
new file mode 100644
index 00000000000..c5db3b4898a
--- /dev/null
+++ b/tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-be-able-to-provision-project.html
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>user-cannot-administrate-profile</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sessions/logout</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/sessions/new</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>login</td>
+ <td>admin-with-provisioning</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>password</td>
+ <td>password</td>
+ </tr>
+ <tr>
+ <td>clickAndWait</td>
+ <td>commit</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=.js-user-authenticated</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/projects_admin</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=#projects-type__ALL</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>assertText</td>
+ <td>css=.page-actions button</td>
+ <td>*Create Project*</td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-not-be-able-to-provision-project.html b/tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-not-be-able-to-provision-project.html
new file mode 100644
index 00000000000..270daf67cd9
--- /dev/null
+++ b/tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-not-be-able-to-provision-project.html
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>user-cannot-administrate-profile</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sessions/logout</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/sessions/new</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>login</td>
+ <td>admin-without-provisioning</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>password</td>
+ <td>password</td>
+ </tr>
+ <tr>
+ <td>clickAndWait</td>
+ <td>commit</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=.js-user-authenticated</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/projects_admin</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=#projects-type__ALL</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>assertNotText</td>
+ <td>css=.page-actions button</td>
+ <td>*Create Project*</td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/tests/src/test/resources/authorisation/QualityProfileAdminPermissionTest/normal-user.html b/tests/src/test/resources/authorisation/QualityProfileAdminPermissionTest/normal-user.html
new file mode 100644
index 00000000000..b9190a27027
--- /dev/null
+++ b/tests/src/test/resources/authorisation/QualityProfileAdminPermissionTest/normal-user.html
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>user-cannot-administrate-profile</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sessions/logout</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/sessions/new</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>login</td>
+ <td>not_profileadm</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>password</td>
+ <td>userpwd</td>
+ </tr>
+ <tr>
+ <td>clickAndWait</td>
+ <td>commit</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=.js-user-authenticated</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/profiles</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForElementPresent</td>
+ <td>css=.quality-profiles-table-row[data-name=&quot;foo&quot;]</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>click</td>
+ <td>css=.quality-profiles-table-row[data-name=&quot;foo&quot;] .quality-profiles-table-name a</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForText</td>
+ <td>css=.quality-profile-header</td>
+ <td>*foo*</td>
+ </tr>
+ <tr>
+ <td>assertElementNotPresent</td>
+ <td>css=.js-change-parent</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
diff --git a/tests/src/test/resources/authorisation/QualityProfileAdminPermissionTest/profile-admin.html b/tests/src/test/resources/authorisation/QualityProfileAdminPermissionTest/profile-admin.html
new file mode 100644
index 00000000000..86d6b26ece8
--- /dev/null
+++ b/tests/src/test/resources/authorisation/QualityProfileAdminPermissionTest/profile-admin.html
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>user-can-administrate-profile</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sessions/logout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/sessions/new</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>login</td>
+ <td>profileadm</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>papwd</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>commit</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>css=.js-user-authenticated</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/profiles</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>css=.quality-profiles-table-row[data-name=&quot;foo&quot;]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=.quality-profiles-table-row[data-name=&quot;foo&quot;] .quality-profiles-table-name a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=.quality-profile-header</td>
+ <td>*foo*</td>
+</tr>
+<tr>
+ <td>assertElementPresent</td>
+ <td>css=.js-change-parent</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/project/quality_profiles?id=sample</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>id=content</td>
+ <td>*Quality Profiles*</td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>id=content</td>
+ <td>*Xoo*</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/tests/src/test/resources/authorisation/one-issue-per-line-profile.xml b/tests/src/test/resources/authorisation/one-issue-per-line-profile.xml
new file mode 100644
index 00000000000..521adc7e06f
--- /dev/null
+++ b/tests/src/test/resources/authorisation/one-issue-per-line-profile.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profile>
+ <name>one-issue-per-line</name>
+ <language>xoo</language>
+ <rules>
+ <rule>
+ <repositoryKey>xoo</repositoryKey>
+ <key>OneIssuePerLine</key>
+ <priority>MINOR</priority>
+ </rule>
+ </rules>
+</profile> \ No newline at end of file