1 |
1e2b2c27
|
Tomáš Šimandl
|
*** Settings ***
|
2 |
|
|
Documentation A test suite with tests of component changing functionality.
|
3 |
|
|
...
|
4 |
|
|
... This test has a workflow that is created using keywords in
|
5 |
|
|
... the imported resource file.
|
6 |
|
|
...
|
7 |
|
|
Suite Setup Open Browser To Diagram
|
8 |
|
|
Test Setup Exclude Vertex
|
9 |
|
|
Test Teardown Reload Diagram Screen
|
10 |
|
|
Suite Teardown Close Browser
|
11 |
|
|
Resource common.robot
|
12 |
|
|
|
13 |
|
|
*** Variables ***
|
14 |
|
|
${graphVersion} //span[@class='graph-version']
|
15 |
|
|
|
16 |
|
|
${activeChange} //div[@id='activeChange']
|
17 |
|
|
${excludedNodeList} //div[@id='excludedNodeListComponent']
|
18 |
|
|
|
19 |
|
|
${changeTriggerButton} //button[contains(@class, 'trigger-change-button')]
|
20 |
|
|
${changeLoadDetailsButton} //button[contains(@class, 'load-details-button')]
|
21 |
|
|
${changeAcceptButton} //button[contains(@class, 'accept-button')]
|
22 |
|
|
${changeRevokeButton} //button[contains(@class, 'revoke-button')]
|
23 |
|
|
|
24 |
|
|
${vertex1} //*[name()='svg'][contains(@class, 'vertex')][@data-id='1']
|
25 |
|
|
${excludedVertex1} //li[contains(@class, 'vertex')][@data-id='1']
|
26 |
|
|
|
27 |
|
|
${vertexChangeButton} //button[contains(@class, 'change-button')]
|
28 |
|
|
|
29 |
|
|
*** Test Cases ***
|
30 |
|
|
Trigger Simple Change
|
31 |
|
|
# trigger change
|
32 |
|
|
Click Element ${activeChange}${changeTriggerButton}
|
33 |
|
|
Wait Until Element Is Not Visible //div[@id='loader']
|
34 |
|
|
# check that valid components were retrieved
|
35 |
|
|
Element Should Contain ${activeChange}//ul[@class='node-list'][2] obcc-parking-example.carpark
|
36 |
|
|
|
37 |
|
|
Trigger Change Including Not Found
|
38 |
|
|
# trigger change
|
39 |
|
|
Select Checkbox name:includeNotFoundClasses
|
40 |
|
|
Click Element ${activeChange}${changeTriggerButton}
|
41 |
|
|
Wait Until Element Is Not Visible //div[@id='loader']
|
42 |
|
|
# check that valid components were retrieved
|
43 |
|
|
Element Should Contain ${activeChange}//ul[@class='node-list'][2] slf4j.api
|
44 |
|
|
Element Should Contain ${activeChange}//ul[@class='node-list'][2] obcc-parking-example.carpark
|
45 |
|
|
Element Should Contain ${activeChange}//ul[@class='node-list'][2] org.osgi.framework
|
46 |
|
|
|
47 |
|
|
Revoke Simple Change
|
48 |
|
|
# trigger change
|
49 |
|
|
Click Element ${activeChange}${changeTriggerButton}
|
50 |
|
|
Wait Until Element Is Not Visible //div[@id='loader']
|
51 |
|
|
# revoke change
|
52 |
|
|
Click Element ${changeRevokeButton}
|
53 |
|
|
Wait Until Element Is Not Visible //div[@id='loader']
|
54 |
|
|
# check that list of proposals is empty
|
55 |
|
|
Xpath Should Match X Times ${activeChange}//ul[@class='node-list'][2]/li 0
|
56 |
|
|
|
57 |
|
|
Accept Simple Change
|
58 |
|
|
# trigger change
|
59 |
|
|
Click Element ${activeChange}${changeTriggerButton}
|
60 |
|
|
Wait Until Element Is Not Visible //div[@id='loader']
|
61 |
|
|
Select Checkbox name:replaceComponents
|
62 |
|
|
# accept change
|
63 |
|
|
Click Element ${changeAcceptButton}
|
64 |
|
|
Wait Until Element Is Not Visible //div[@id='loader']
|
65 |
|
|
# check name of the replacing component
|
66 |
|
|
${name}= Get Element Attribute ${vertex1} data-name
|
67 |
|
|
Should Be Equal As Strings ${name} obcc-parking-example.carpark.jar
|
68 |
|
|
# check graph version
|
69 |
|
|
${version}= Get Text ${graphVersion}
|
70 |
|
|
Should Be Equal As Strings ${version} graph version: 2
|
71 |
|
|
|
72 |
|
|
*** Keywords ***
|
73 |
|
|
Exclude Vertex
|
74 |
|
|
Select Radio Button actionMove exclude
|
75 |
|
|
Click Element ${vertex1}
|
76 |
|
|
Click Element ${excludedNodeList}${excludedVertex1}${vertexChangeButton}
|