Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gui custom capabilities testcases #2287

Merged
merged 25 commits into from
Nov 22, 2021
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9d7de35
Add CustomCapabilities testcase
maryvictol Oct 29, 2021
d87e3a2
Merge branch 'develop' into gui_custom_capabilities_testcases
maryvictol Oct 29, 2021
d0c6ccc
Update CustomCapabilities testcase
maryvictol Oct 30, 2021
3912ec8
add customCapabilities test
maryvictol Nov 2, 2021
00c63e9
Merge remote-tracking branch 'origin/develop' into gui_custom_capabil…
maryvictol Nov 2, 2021
7f8ef8f
update customCapabilities tests
maryvictol Nov 3, 2021
1d1b3e0
update CustomCapabilities test
maryvictol Nov 8, 2021
15fe275
update CustomCapabilities test
maryvictol Nov 8, 2021
c87ba0d
update customCapabilities test
maryvictol Nov 8, 2021
793ae0e
update customCapabilities testcase
maryvictol Nov 11, 2021
07428b8
Update customCapabilities testcase
maryvictol Nov 11, 2021
a291bef
add CustomCapabilities test 2295
maryvictol Nov 12, 2021
02ec2ef
update CustomCapabilities test
maryvictol Nov 12, 2021
0577eae
update CustomCapabilities test
maryvictol Nov 12, 2021
b4639f7
update CustomCapabilities test
maryvictol Nov 12, 2021
8fb19ca
update CustomCapabilities test
maryvictol Nov 12, 2021
0e25883
update CustomCapabilities test
maryvictol Nov 12, 2021
cb62a26
update CustomCapabilities test
maryvictol Nov 12, 2021
cba79a5
update CustomCapabilities test
maryvictol Nov 12, 2021
1d0c0b6
update CustomCapabilities test
maryvictol Nov 12, 2021
4b11fd4
update CustomCapabilities test
maryvictol Nov 12, 2021
8a380e9
Update customCapabilities testcases
maryvictol Nov 15, 2021
a0bb643
update CustomCapabilities test
maryvictol Nov 15, 2021
dc12530
update CustomCapabilities tests
maryvictol Nov 15, 2021
b707d47
Issue #2287 custom capabilities small clean up
kamyshova Nov 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update customCapabilities testcase
  • Loading branch information
maryvictol committed Nov 11, 2021
commit 07428b83d1ff5de369f0c57edaab7a1e566e71a3
71 changes: 37 additions & 34 deletions docs/testcases/UI/Run_tools_in_sandbox/Launch_parameters/2234.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
# "Custom" capabilities implementation

Test verifies that admin can specify

**Prerequisites**:
- Admin user

| Steps | Actions | Expected results |
| :---: | --- | --- |
| 1 | Login as the admin user from the prerequisites | |
| 2 | Open the **Settings** page | |
| 3 | Open the **PREFERENCES** tab | |
| 4 | Click the **Launch** tab | |
| 5 | Find the **`launch.capabilities`** preference | |
| 6 | Save the preference value, then clear and input the following json <ul> `{` <ul> `"testCapability1": {` <ul> `"description": "Custom test capability 1"`, <br> `"commands": [` <ul> `"echo testLine1"`, <br> `"echo 'testLine1' > ~/testFile1.txt"` </ul> `]` </ul> `},` <br> `"testCapability2": {` <ul> `"description": "Custom test capability 2",` <br> `"commands": [` <ul> `"echo testLine2",` <br> `"echo 'testLine2' > ~/testFile1.txt"` </ul> `]` </ul> `}` </ul> `}` |
| 7 | Click **Save** button | |
| 8 | Open the **Tools** page | |
| 9 | Select the test tool | |
| 10 | Run with custom settings | |
| 11 | Expand **Exec environment** section | |
| 12 | Click into the field near the ***Run capabilities*** label | Drop-down list of capabilities appears and contains ***testCapability1*** and ***testCapability2*** |
| 13 | Select ***testCapability1*** and ***testCapability2*** from list | |
| 14 | Hover over ***testCapability1*** and ***testCapability2*** values in the ***Run capabilities*** field | Descriptions *Custom test capability 1* and *Custom test capability 2* are shown on the corresponding tooltips |
| 15 | Launch the tool | |
| 16 | At the **Runs** page, click the just-launched run | |
| 17 | Expand the Parameters section | The Parameters section contains **CP_CAP_CUSTOM_testCapability1: true** and **CP_CAP_CUSTOM_testCapability2: true** |
| 18 | Wait until the SSH hyperlink appears. Click the *Console* task. | Log contains next text: <ul> `Running 'testCapability1' commands:` <br> `--> Command: 'echo testLine1'` <br> `Running 'testCapability2' commands:` <br> `--> Command: 'echo testLine2'`|
| 19 | Click the SSH hyperlink | |
| 20 | In the opened tab, enter and perform the command: `ls` | Name of the ***testFile1.txt*** file is displayed |
| 21 | Enter and perform the command: <ul> `cat testFile1.txt` | `testFile1.txt` file contains `testLine1` and `testLine2` |
| 22 | Close the tab with terminal | |

**After:**
- Stop the run launched at step 15
# "Custom" capabilities implementation

Test verifies that admin can specify custom scripts in the platform settings and allow users to select them in the **Run capabilities** menu.

**Prerequisites**:
- Admin user
- Non-admin user
- Test tool is available to the non-admin user

| Steps | Actions | Expected results |
| :---: | --- | --- |
| 1 | Login as the admin user from the prerequisites | |
| 2 | Open the **Settings** page | |
| 3 | Open the **PREFERENCES** tab | |
| 4 | Click the **Launch** tab | |
| 5 | Find the **`launch.capabilities`** preference | |
| 6 | Save the preference value, then clear and input the following json <ul> `{` <ul> `"testCapability1": {` <ul> `"description": "Custom test capability 1"`, <br> `"commands": [` <ul> `"echo testLine1"`, <br> `"echo 'testLine1' > ~/testFile1.txt"` </ul> `]` </ul> `},` <br> `"testCapability2": {` <ul> `"description": "Custom test capability 2",` <br> `"commands": [` <ul> `"echo testLine2",` <br> `"echo 'testLine2' > ~/testFile1.txt"` </ul> `]` </ul> `}` </ul> `}` |
NShaforostov marked this conversation as resolved.
Show resolved Hide resolved
| 7 | Click **Save** button | |
| 8 | Login as the non-admin user from the prerequisites | |
| 9 | Open the **Tools** page | |
| 10 | Select the test tool | |
| 11 | Run with custom settings | |
NShaforostov marked this conversation as resolved.
Show resolved Hide resolved
| 12 | Expand **Exec environment** section | |
| 13 | Click into the field near the ***Run capabilities*** label | Drop-down list of capabilities appears and contains ***testCapability1*** and ***testCapability2*** |
| 14 | Select ***testCapability1*** and ***testCapability2*** from list | |
| 15 | Hover over ***testCapability1*** and ***testCapability2*** values in the ***Run capabilities*** field | Descriptions *Custom test capability 1* and *Custom test capability 2* are shown on the corresponding tooltips |
| 16 | Launch the tool | |
| 17 | At the **Runs** page, click the just-launched run | |
| 18 | Expand the Parameters section | The Parameters section contains **CP_CAP_CUSTOM_testCapability1: true** and **CP_CAP_CUSTOM_testCapability2: true** |
| 19 | Wait until the SSH hyperlink appears. Click the *Console* task. | Log contains next text: <ul> `Running 'testCapability1' commands:` <br> `--> Command: 'echo testLine1'` <br> `Running 'testCapability2' commands:` <br> `--> Command: 'echo testLine2'`|
| 20 | Click the SSH hyperlink | |
| 21 | In the opened tab, enter and perform the command: `ls` | Name of the ***testFile1.txt*** file is displayed |
| 22 | Enter and perform the command: <ul> `cat testFile1.txt` | `testFile1.txt` file contains `testLine1` and `testLine2` |
| 23 | Close the tab with terminal | |

**After:**
- Stop the run launched at step 16
- Restore the value of the `launch.capabilities` preference to the previous value saved at step 6