Revize 64df9f26
Přidáno uživatelem Pavel Fidranský před více než 6 roky(ů)
sources/src/main/webapp/tests/change.robot | ||
---|---|---|
1 |
*** Settings *** |
|
2 |
Documentation A test suite with tests of change actions. |
|
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 Demo Diagram |
|
8 |
Test Setup Select Radio Button actionMove exclude |
|
9 |
Test Teardown Reload Diagram Screen |
|
10 |
Suite Teardown Close Browser |
|
11 |
Resource common.robot |
|
12 |
|
|
13 |
*** Variables *** |
|
14 |
${postponedButton} //button[@id='postponedButton'] |
|
15 |
|
|
16 |
${activeChange} //div[@id='activeChange'] |
|
17 |
${postponedChangeList} //div[@id='postponedChangeListComponent'] |
|
18 |
${excludedNodeList} //div[@id='excludedNodeListComponent'] |
|
19 |
|
|
20 |
${vertex1} //*[name()='svg'][contains(@class, 'vertex')][@data-id='1'] |
|
21 |
${excludedVertex1} //li[contains(@class, 'vertex')][@data-id='1'] |
|
22 |
|
|
23 |
${changePostponeButton} //button[contains(@class, 'postpone-button')] |
|
24 |
${changeActivateButton} //button[contains(@class, 'activate-button')] |
|
25 |
|
|
26 |
${vertexIncludeButton} //button[contains(@class, 'include-button')] |
|
27 |
${vertexChangeButton} //button[contains(@class, 'change-button')] |
|
28 |
|
|
29 |
*** Test Cases *** |
|
30 |
Add Vertex To Change |
|
31 |
Click Element ${vertex1} |
|
32 |
Click Element ${excludedNodeList}${excludedVertex1}${vertexChangeButton} |
|
33 |
Element Should Not Be Visible ${excludedNodeList}${excludedVertex1} |
|
34 |
Element Should Be Visible ${activeChange}${excludedVertex1} |
|
35 |
|
|
36 |
Postpone And Activate Change |
|
37 |
Click Element ${postponedButton} |
|
38 |
Click Element ${vertex1} |
|
39 |
Click Element ${excludedNodeList}${excludedVertex1}${vertexChangeButton} |
|
40 |
# postpone change |
|
41 |
Click Element ${activeChange}${changePostponeButton} |
|
42 |
# check that change is in list of postponed |
|
43 |
Element Should Not Be Visible ${activeChange}${excludedVertex1} |
|
44 |
Element Should Be Visible ${postponedChangeList}${excludedVertex1} |
|
45 |
# activate change |
|
46 |
Click Element ${postponedChangeList}${changeActivateButton} |
|
47 |
# check that change is back active |
|
48 |
Element Should Not Be Visible ${postponedChangeList}${excludedVertex1} |
|
49 |
Element Should Be Visible ${activeChange}${excludedVertex1} |
|
50 |
|
|
51 |
*** Keywords *** |
sources/src/main/webapp/tests/common.robot | ||
---|---|---|
1 | 1 |
*** Settings *** |
2 | 2 |
Documentation A resource file with reusable keywords and variables. |
3 |
... |
|
4 |
... The system specific keywords created here form our own |
|
5 |
... domain specific language. They utilize keywords provided |
|
6 |
... by the imported Selenium2Library. |
|
3 |
|
|
7 | 4 |
Library Selenium2Library |
5 |
Library OperatingSystem |
|
6 |
|
|
8 | 7 |
|
9 | 8 |
*** Variables *** |
10 | 9 |
${BROWSER} Chrome |
11 | 10 |
${DELAY} 0.1 |
12 | 11 |
|
13 |
${SERVER} http://localhost:8080/cocaex-compatibility |
|
14 |
${TEST DATA PATH} C:\\Users\\fidra\\Work\\cocaex\\branches\\cocaex-jacc-integration\\test-data |
|
12 |
${SERVER} http://localhost:8080/imiger/ |
|
13 |
${TEST DATA PATH} ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}data${/} |
|
14 |
|
|
15 |
${UPLOAD FILES URL} ${SERVER} |
|
16 |
${GRAPH URL} ${SERVER}/graph |
|
15 | 17 |
|
16 |
${BASE URL} ${SERVER} |
|
17 |
${UPLOAD FILES URL} ${SERVER}/upload-files |
|
18 |
${GRAPH URL} ${SERVER}/graph |
|
19 | 18 |
|
20 | 19 |
*** Keywords *** |
21 | 20 |
Open Browser To Base Path |
22 |
Open Browser ${BASE URL} ${BROWSER}
|
|
21 |
Open Browser ${UPLOAD FILES URL} ${BROWSER}
|
|
23 | 22 |
Maximize Browser Window |
24 | 23 |
Set Selenium Speed ${DELAY} |
25 | 24 |
|
25 |
|
|
26 | 26 |
Go To Upload Screen |
27 |
Go To ${UPLOAD FILES URL} |
|
27 |
Go To ${UPLOAD FILES URL}
|
|
28 | 28 |
|
29 |
Open Demo Diagram |
|
30 |
[Arguments] ${demoId} |
|
31 |
${formName}= Catenate SEPARATOR= demoDiagramForm ${demoId} |
|
32 |
Click Element //form[@name='${formName}']/a |
|
33 |
Wait Until Element Is Not Visible //div[@id='loader'] |
|
34 | 29 |
|
35 | 30 |
Open Diagram |
36 |
Choose File //input[@id='fileUpload'] ${TEST DATA PATH}${/}obcc-parking-example${/}obcc-parking-example.carpark-svc.jar |
|
37 |
Click Element //input[@type='submit'][@value='Upload'] |
|
38 |
Choose File //input[@id='fileUpload'] ${TEST DATA PATH}${/}obcc-parking-example${/}obcc-parking-example.dashboard-svc.jar |
|
39 |
Click Element //input[@type='submit'][@value='Upload'] |
|
40 |
Choose File //input[@id='fileUpload'] ${TEST DATA PATH}${/}obcc-parking-example${/}obcc-parking-example.gate.jar |
|
41 |
Click Element //input[@type='submit'][@value='Upload'] |
|
42 |
Choose File //input[@id='fileUpload'] ${TEST DATA PATH}${/}obcc-parking-example${/}obcc-parking-example.statsbase-svc.jar |
|
43 |
Click Element //input[@type='submit'][@value='Upload'] |
|
44 |
Choose File //input[@id='fileUpload'] ${TEST DATA PATH}${/}obcc-parking-example${/}obcc-parking-example.trafficlane-svc.jar |
|
45 |
Click Element //input[@type='submit'][@value='Upload'] |
|
46 |
Click Element //input[@type='submit'][@value='Start visualization'] |
|
47 |
Wait Until Element Is Not Visible //div[@id='loader'] |
|
31 |
${filePath}= Normalize Path ${TEST DATA PATH}SPADe JSONs${/}aswi2017mutant-industries-ltd.json |
|
32 |
Choose File name:file ${filePath} |
|
33 |
Select Radio Button jsonFileFormat spade |
|
34 |
Click Element //div[@class="upload-form"]//button[@type="submit"] |
|
35 |
Wait Until Element Is Not Visible //div[@id="loader"] |
|
36 |
|
|
48 | 37 |
|
49 | 38 |
Open Browser To Demo Diagram |
50 | 39 |
Open Browser To Base Path |
51 |
Open Demo Diagram 6 |
|
40 |
Click Element //ul[@id="publicDiagramList"]/li[1]/a[text()="robot"] |
|
41 |
Wait Until Element Is Not Visible //div[@id="loader"] |
|
42 |
|
|
52 | 43 |
|
53 | 44 |
Open Browser To Diagram |
54 | 45 |
Open Browser To Base Path |
55 | 46 |
Open Diagram |
56 | 47 |
|
48 |
|
|
57 | 49 |
Reload Diagram Screen |
58 | 50 |
Reload Page |
59 |
Wait Until Element Is Not Visible //div[@id='loader'] |
|
51 |
Wait Until Element Is Not Visible //div[@id="loader"] |
|
52 |
|
|
60 | 53 |
|
61 | 54 |
Element Should Have Class |
62 |
[Arguments] ${element} ${className} |
|
63 |
Page Should Contain Element ${element}[contains(@class, '${className}')] |
|
55 |
[Arguments] ${element} ${className} |
|
56 |
Page Should Contain Element ${element}[contains(@class, "${className}")] |
|
57 |
|
|
64 | 58 |
|
65 | 59 |
Element Should Not Have Class |
66 |
[Arguments] ${element} ${className} |
|
67 |
Page Should Not Contain Element ${element}[contains(@class, '${className}')] |
|
60 |
[Arguments] ${element} ${className} |
|
61 |
Page Should Not Contain Element ${element}[contains(@class, "${className}")] |
sources/src/main/webapp/tests/component-changing.robot | ||
---|---|---|
1 |
*** 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} |
sources/src/main/webapp/tests/edge.robot | ||
---|---|---|
1 | 1 |
*** Settings *** |
2 | 2 |
Documentation A test suite with tests of edge actions. |
3 |
... |
|
4 |
... This test has a workflow that is created using keywords in |
|
5 |
... the imported resource file. |
|
6 |
... |
|
3 |
|
|
7 | 4 |
Suite Setup Open Browser To Demo Diagram |
8 |
Test Teardown Reload Diagram Screen |
|
9 | 5 |
Suite Teardown Close Browser |
6 |
Test Teardown Reload Diagram Screen |
|
7 |
|
|
10 | 8 |
Resource common.robot |
11 | 9 |
|
10 |
|
|
12 | 11 |
*** Variables *** |
13 |
${edge1} //*[name()='g'][contains(@class, 'edge')][@data-id='1']
|
|
12 |
${edge38} //*[name()="g"][contains(@class, "edge")][@data-id="38"]
|
|
14 | 13 |
|
15 |
${vertex1} //*[name()='svg'][contains(@class, 'vertex')][@data-id='1'] |
|
16 |
${vertex2} //*[name()='svg'][contains(@class, 'vertex')][@data-id='2'] |
|
17 |
${vertex3} //*[name()='svg'][contains(@class, 'vertex')][@data-id='3'] |
|
18 |
${vertex4} //*[name()='svg'][contains(@class, 'vertex')][@data-id='4'] |
|
19 |
${vertex5} //*[name()='svg'][contains(@class, 'vertex')][@data-id='5'] |
|
20 |
${vertex6} //*[name()='svg'][contains(@class, 'vertex')][@data-id='6'] |
|
14 |
${vertex4} //*[name()="svg"][contains(@class, "vertex")][@data-id="4"] |
|
15 |
${vertex2014} //*[name()="svg"][contains(@class, "vertex")][@data-id="2014"] |
|
21 | 16 |
|
22 |
${edgeLollipop} /*[name()='g'][contains(@class, 'lollipop')] |
|
17 |
${edgeArrow} /*[name()="g"][contains(@class, "arrow")] |
|
18 |
|
|
19 |
${edgePopover} //div[contains(@class, "edge-popover")] |
|
23 | 20 |
|
24 |
${edgePopover} //div[contains(@class, 'edge-popover')] |
|
25 | 21 |
|
26 | 22 |
*** Test Cases *** |
27 | 23 |
Highlight Edge |
28 |
Click Element ${edge1}${edgeLollipop}
|
|
24 |
Click Element ${edge38}${edgeArrow}
|
|
29 | 25 |
# check that vertices not connected to the edge are not highlighted |
30 |
Element Should Have Class ${edge1} edge--highlighted |
|
31 |
Element Should Have Class ${vertex1} node--highlighted |
|
32 |
Element Should Not Have Class ${vertex2} node--highlighted |
|
33 |
Element Should Not Have Class ${vertex3} node--highlighted |
|
34 |
Element Should Not Have Class ${vertex4} node--highlighted |
|
35 |
Element Should Not Have Class ${vertex5} node--highlighted |
|
36 |
Element Should Have Class ${vertex6} node--highlighted |
|
26 |
Element Should Have Class ${edge38} edge--highlighted |
|
27 |
Element Should Have Class ${vertex4} node--highlighted |
|
28 |
Element Should Have Class ${vertex2014} node--highlighted |
|
29 |
|
|
37 | 30 |
|
38 | 31 |
Hide Edge Popover By Moving Mouse Out |
39 |
Click Element ${edge1}${edgeLollipop}
|
|
40 |
Mouse Out ${edgePopover} |
|
32 |
Click Element ${edge38}${edgeArrow}
|
|
33 |
Mouse Out ${edgePopover}
|
|
41 | 34 |
Element Should Not Be Visible ${edgePopover} |
42 |
Element Should Have Class ${edgePopover} hidden |
|
35 |
Element Should Have Class ${edgePopover} hidden |
|
36 |
|
|
43 | 37 |
|
44 | 38 |
Hide Edge Popover By Clicking Elsewhere |
45 |
Click Element ${edge1}${edgeLollipop}
|
|
46 |
Click Element //body |
|
39 |
Click Element ${edge38}${edgeArrow}
|
|
40 |
Click Element //body
|
|
47 | 41 |
Element Should Not Be Visible ${edgePopover} |
48 |
Element Should Have Class ${edgePopover} hidden |
|
49 |
|
|
50 |
*** Keywords *** |
|
42 |
Element Should Have Class ${edgePopover} hidden |
sources/src/main/webapp/tests/graph.robot | ||
---|---|---|
1 | 1 |
*** Settings *** |
2 | 2 |
Documentation A test suite with tests of graph construction. |
3 |
... |
|
4 |
... This test has a workflow that is created using keywords in |
|
5 |
... the imported resource file. |
|
6 |
... |
|
3 |
|
|
7 | 4 |
Suite Setup Open Browser To Diagram |
8 | 5 |
Suite Teardown Close Browser |
6 |
|
|
9 | 7 |
Resource common.robot |
10 | 8 |
|
9 |
|
|
11 | 10 |
*** Variables *** |
12 |
${graphWrapper} //*[name()='g'][@id='graph'] |
|
13 |
${unconnectedNodeList} //div[@id='unconnectedNodeListComponent'] |
|
11 |
${graphWrapper} //*[name()="g"][@id="graph"] |
|
12 |
${unconnectedNodeList} //div[@id="unconnectedNodeListComponent"] |
|
13 |
${componentCounter} //span[@class="component-counter"] |
|
14 | 14 |
|
15 |
${componentCounter} //span[@class='component-counter'] |
|
16 |
${graphVersion} //span[@class='graph-version'] |
|
15 |
${vertex2} //*[name()="svg"][contains(@class, "vertex")][@data-id="2"] |
|
16 |
${vertex4} //*[name()="svg"][contains(@class, "vertex")][@data-id="4"] |
|
17 |
${vertex291} //*[name()="svg"][contains(@class, "vertex")][@data-id="291"] |
|
18 |
${vertex303} //*[name()="svg"][contains(@class, "vertex")][@data-id="303"] |
|
17 | 19 |
|
18 |
${vertex1} //*[name()='svg'][contains(@class, 'vertex')][@data-id='1'] |
|
19 |
${vertex2} //*[name()='svg'][contains(@class, 'vertex')][@data-id='2'] |
|
20 |
${vertex3} //*[name()='svg'][contains(@class, 'vertex')][@data-id='3'] |
|
21 |
${vertex4} //li[@data-id='4'] |
|
22 |
${vertex5} //*[name()='svg'][contains(@class, 'vertex')][@data-id='5'] |
|
23 |
${vertex6} //*[name()='svg'][contains(@class, 'vertex')][@data-id='6'] |
|
20 |
${vertex0} //*[name()="li"][contains(@class, "vertex")][@data-id="0"] |
|
21 |
${vertex6} //*[name()="li"][contains(@class, "vertex")][@data-id="6"] |
|
24 | 22 |
|
25 | 23 |
*** Test Cases *** |
26 | 24 |
General |
27 |
Title Should Be Visualization of large component diagrams
|
|
25 |
Title Should Be IMiGEr
|
|
28 | 26 |
# check component counter |
29 |
${count}= Get Text ${componentCounter} |
|
30 |
Should Be Equal As Strings ${count} loaded components: 6 |
|
31 |
# check graph version |
|
32 |
${version}= Get Text ${graphVersion} |
|
33 |
Should Be Equal As Strings ${version} graph version: 1 |
|
34 |
# check vertices that should (not) be contained in viewport |
|
35 |
Page Should Contain Element ${graphWrapper}${vertex1} |
|
27 |
${count}= Get Text ${componentCounter} |
|
28 |
Should Be Equal As Strings ${count} loaded components: 19 |
|
29 |
# check vertices that should be contained in viewport |
|
36 | 30 |
Page Should Contain Element ${graphWrapper}${vertex2} |
37 |
Page Should Contain Element ${graphWrapper}${vertex3} |
|
38 |
Page Should Not Contain Element ${graphWrapper}${vertex4} |
|
39 |
Page Should Contain Element ${graphWrapper}${vertex5} |
|
40 |
Page Should Contain Element ${graphWrapper}${vertex6} |
|
41 |
# check vertices that should (not) be contained in unconnected node list |
|
42 |
Page Should Not Contain Element ${unconnectedNodeList}${vertex1} |
|
43 |
Page Should Not Contain Element ${unconnectedNodeList}${vertex2} |
|
44 |
Page Should Not Contain Element ${unconnectedNodeList}${vertex3} |
|
45 |
Page Should Contain Element ${unconnectedNodeList}${vertex4} |
|
46 |
Page Should Not Contain Element ${unconnectedNodeList}${vertex5} |
|
47 |
Page Should Not Contain Element ${unconnectedNodeList}${vertex6} |
|
48 |
|
|
49 |
*** Keywords *** |
|
31 |
Page Should Contain Element ${graphWrapper}${vertex4} |
|
32 |
Page Should Contain Element ${graphWrapper}${vertex291} |
|
33 |
Page Should Contain Element ${graphWrapper}${vertex303} |
|
34 |
# check vertices that should be contained in unconnected node list |
|
35 |
Page Should Contain Element ${unconnectedNodeList}${vertex0} |
|
36 |
Page Should Contain Element ${unconnectedNodeList}${vertex6} |
sources/src/main/webapp/tests/group.robot | ||
---|---|---|
1 | 1 |
*** Settings *** |
2 | 2 |
Documentation A test suite with tests of vertex grouping functionality. |
3 |
... |
|
4 |
... This test has a workflow that is created using keywords in |
|
5 |
... the imported resource file. |
|
6 |
... |
|
3 |
|
|
7 | 4 |
Suite Setup Open Browser To Demo Diagram |
8 |
Test Setup Click Element //button[@id='vertexToGroup'] |
|
9 |
Test Teardown Reload Diagram Screen |
|
10 | 5 |
Suite Teardown Close Browser |
6 |
Test Setup Click Element //button[@id="vertexToGroup"] |
|
7 |
Test Teardown Reload Diagram Screen |
|
8 |
|
|
11 | 9 |
Resource common.robot |
12 | 10 |
|
11 |
|
|
13 | 12 |
*** Variables *** |
14 |
${zoomInButton} //button[@id='zoomIn'] |
|
13 |
${zoomInButton} //button[@id="zoomIn"] |
|
14 |
|
|
15 |
${vertex2014} //*[name()="svg"][contains(@class, "vertex")][@data-id="2014"] |
|
16 |
${vertex2019} //*[name()="svg"][contains(@class, "vertex")][@data-id="2019"] |
|
15 | 17 |
|
16 |
${vertex5} //*[name()='svg'][contains(@class, 'vertex')][@data-id='5'] |
|
17 |
${vertex6} //*[name()='svg'][contains(@class, 'vertex')][@data-id='6'] |
|
18 |
${group1} //*[name()="svg"][contains(@class, "group")][@data-id="1"] |
|
18 | 19 |
|
19 |
${group1} //*[name()='svg'][contains(@class, 'group')][@data-id='1'] |
|
20 |
${groupName} /*[name()="text"][@class="group-name"] |
|
21 |
${groupDissolveButton} /*[name()="g"][contains(@class, "dissolve-button")] |
|
20 | 22 |
|
21 |
${groupName} /*[name()='text'][@class='group-name'] |
|
22 |
${groupVertexList} /*[name()='g'][@class='group-vertex-list'] |
|
23 |
${groupExpandButton} /*[name()='g'][contains(@class, 'expand-button')] |
|
24 |
${groupCompressButton} /*[name()='g'][contains(@class, 'compress-button')] |
|
25 |
${groupDissolveButton} /*[name()='g'][contains(@class, 'dissolve-button')] |
|
23 |
${vertexContextMenu} //div[contains(@class, "context-menu")] |
|
26 | 24 |
|
27 |
${vertexContextMenu} //div[contains(@class, 'context-menu')] |
|
28 | 25 |
|
29 | 26 |
*** Test Cases *** |
30 | 27 |
Mouse Down Group |
31 |
Mouse Down ${group1} |
|
32 |
Element Should Have Class ${group1} node--dragged |
|
33 |
Mouse Up ${group1} |
|
28 |
Mouse Down ${group1}
|
|
29 |
Element Should Have Class ${group1} node--dragged
|
|
30 |
Mouse Up ${group1}
|
|
34 | 31 |
Element Should Not Have Class ${group1} node--dragged |
35 | 32 |
|
33 |
|
|
36 | 34 |
Drag Group |
37 | 35 |
# zoom in to 100% to get correct coordinates |
38 | 36 |
Click Element ${zoomInButton} |
39 | 37 |
Click Element ${zoomInButton} |
40 | 38 |
# get old group coordinates |
41 | 39 |
${oldX}= Get Element Attribute ${group1} x |
42 |
${oldX}= Convert To Number ${oldX} 2 |
|
40 |
${oldX}= Convert To Number ${oldX} 2
|
|
43 | 41 |
${oldY}= Get Element Attribute ${group1} y |
44 |
${oldY}= Convert To Number ${oldY} 2 |
|
42 |
${oldY}= Convert To Number ${oldY} 2
|
|
45 | 43 |
# move vertex by 10 pixels in both directions |
46 |
Drag And Drop By Offset ${group1} 10 10 |
|
44 |
Drag And Drop By Offset ${group1} 10 10
|
|
47 | 45 |
# get new group coordinates |
48 | 46 |
${newX}= Get Element Attribute ${group1} x |
49 |
${newX}= Convert To Number ${newX} 2 |
|
47 |
${newX}= Convert To Number ${newX} 2
|
|
50 | 48 |
${newY}= Get Element Attribute ${group1} y |
51 |
${newY}= Convert To Number ${newY} 2 |
|
49 |
${newY}= Convert To Number ${newY} 2
|
|
52 | 50 |
# check that offset matches |
53 |
Should Be Equal As Numbers ${oldX + 10} ${newX} |
|
54 |
Should Be Equal As Numbers ${oldY + 10} ${newY} |
|
51 |
Should Be Equal As Numbers ${oldX + 10} ${newX} |
|
52 |
Should Be Equal As Numbers ${oldY + 10} ${newY} |
|
53 |
|
|
55 | 54 |
|
56 | 55 |
Rename Group |
57 |
Element Should Contain ${group1}${groupName} Group 1
|
|
56 |
Element Should Contain ${group1}${groupName} File
|
|
58 | 57 |
# trigger group rename prompt |
59 |
Click Element ${group1}/*[name()='text']
|
|
60 |
Input Text Into Alert Lorem Ipsum |
|
58 |
Click Element ${group1}/*[name()="text"]
|
|
59 |
Input Text Into Alert Lorem Ipsum
|
|
61 | 60 |
# check that group name was changed |
62 |
Element Should Contain ${group1}${groupName} Lorem Ipsum |
|
63 |
|
|
64 |
Expand And Compress Group |
|
65 |
# expand group |
|
66 |
Click Element ${group1}${groupExpandButton} |
|
67 |
# check that group is expanded |
|
68 |
Element Should Have Class ${group1} group--expanded |
|
69 |
Element Should Not Be Visible ${group1}${groupExpandButton} |
|
70 |
Element Should Be Visible ${group1}${groupCompressButton} |
|
71 |
Element Should Be Visible ${group1}${groupVertexList} |
|
72 |
# compress group |
|
73 |
Click Element ${group1}${groupCompressButton} |
|
74 |
# check that group is back to normal |
|
75 |
Element Should Not Have Class ${group1} group--expanded |
|
76 |
Element Should Be Visible ${group1}${groupExpandButton} |
|
77 |
Element Should Not Be Visible ${group1}${groupCompressButton} |
|
78 |
Element Should Not Be Visible ${group1}${groupVertexList} |
|
61 |
Element Should Contain ${group1}${groupName} Lorem Ipsum |
|
62 |
|
|
79 | 63 |
|
80 | 64 |
Dissolve Group |
81 |
Click Element ${group1}${groupDissolveButton} |
|
65 |
Click Element ${group1}${groupDissolveButton}
|
|
82 | 66 |
# check that group is not visible while its vertex is |
83 | 67 |
Element Should Not Be Visible ${group1} |
84 |
Element Should Be Visible ${vertex6} |
|
68 |
Element Should Be Visible ${vertex2019} |
|
69 |
|
|
85 | 70 |
|
86 | 71 |
Add Vertex To Group |
87 | 72 |
# open vertex context menu |
88 |
Open Context Menu ${vertex5}
|
|
89 |
Element Should Be Visible ${vertexContextMenu} |
|
73 |
Open Context Menu ${vertex2014}
|
|
74 |
Element Should Be Visible ${vertexContextMenu}
|
|
90 | 75 |
# add vertex to group |
91 |
Click Element ${vertexContextMenu}//li[1] |
|
76 |
Click Element ${vertexContextMenu}//li[1]
|
|
92 | 77 |
# check that neither vertex nor its context menu is visible |
93 | 78 |
Element Should Not Be Visible ${vertexContextMenu} |
94 |
Element Should Not Be Visible ${vertex5} |
|
95 |
|
|
96 |
*** Keywords *** |
|
79 |
Element Should Not Be Visible ${vertex2014} |
sources/src/main/webapp/tests/navbar.robot | ||
---|---|---|
1 | 1 |
*** Settings *** |
2 | 2 |
Documentation A test suite with tests of navbar actions. |
3 |
... |
|
4 |
... This test has a workflow that is created using keywords in |
|
5 |
... the imported resource file. |
|
6 |
... |
|
3 |
|
|
7 | 4 |
Suite Setup Open Browser To Demo Diagram |
8 |
Test Teardown Reload Diagram Screen |
|
9 | 5 |
Suite Teardown Close Browser |
6 |
Test Teardown Reload Diagram Screen |
|
7 |
|
|
10 | 8 |
Resource common.robot |
11 | 9 |
|
10 |
|
|
12 | 11 |
*** Variables *** |
13 |
${navbar} //div[@id='navigation']
|
|
14 |
${graphWrapper} //*[name()='g'][@id='graph']
|
|
12 |
${navbar} //div[@id="navigation"]
|
|
13 |
${graphWrapper} //*[name()="g"][@id="graph"]
|
|
15 | 14 |
|
16 |
${mostEdgeButton} //button[@id='mostEdge']
|
|
17 |
${vertexToGroupButton} //button[@id='vertexToGroup']
|
|
18 |
${backToUploadButton} //a[@id='view_back_to_upload']
|
|
15 |
${mostEdgeButton} //button[@id="mostEdge"]
|
|
16 |
${vertexToGroupButton} //button[@id="vertexToGroup"]
|
|
17 |
${backToUploadButton} //a[@id="view_back_to_upload"]
|
|
19 | 18 |
|
20 |
${excludedNodeList} //div[@id='excludedNodeListComponent'] |
|
19 |
${excludedNodeList} //div[@id="excludedNodeListComponent"] |
|
20 |
|
|
21 |
${group1} //*[name()="svg"][contains(@class, "group")][@data-id="1"] |
|
22 |
${vertex2044} //*[name()="svg"][contains(@class, "vertex")][@data-id="2044"] |
|
23 |
${excludedVertex2044} //li[contains(@class, "vertex")][@data-id="2044"] |
|
21 | 24 |
|
22 |
${group1} //*[name()='svg'][contains(@class, 'group')][@data-id='1'] |
|
23 |
${vertex6} //*[name()='svg'][contains(@class, 'vertex')][@data-id='6'] |
|
24 |
${excludedVertex6} //li[contains(@class, 'vertex')][@data-id='6'] |
|
25 | 25 |
|
26 | 26 |
*** Test Cases *** |
27 | 27 |
Exclude Vertex With Most Edges |
28 |
Click Element ${mostEdgeButton} |
|
28 |
Click Element ${mostEdgeButton}
|
|
29 | 29 |
# vertex with most edges should be excluded |
30 |
Page Should Not Contain Element ${graphWrapper}${vertex6} |
|
31 |
Page Should Contain Element ${excludedNodeList}${excludedVertex6} |
|
30 |
Page Should Not Contain Element ${graphWrapper}${vertex2044} |
|
31 |
Page Should Contain Element ${excludedNodeList}${excludedVertex2044} |
|
32 |
|
|
32 | 33 |
|
33 | 34 |
Exclude Vertex With Most Edges To Group |
34 |
Click Element ${vertexToGroupButton} |
|
35 |
Click Element ${vertexToGroupButton}
|
|
35 | 36 |
# vertex with most edges should be in a group |
36 |
Page Should Not Contain Element ${graphWrapper}${vertex6}
|
|
37 |
Page Should Not Contain Element ${graphWrapper}${vertex2044}
|
|
37 | 38 |
Page Should Contain Element ${graphWrapper}${group1} |
38 | 39 |
|
39 |
Back To Upload |
|
40 |
Click Element ${backToUploadButton} |
|
41 |
${location}= Get Location |
|
42 |
Should Be Equal As Strings ${location} ${UPLOAD FILES URL} |
|
43 | 40 |
|
44 |
*** Keywords *** |
|
41 |
Back To Upload |
|
42 |
Click Element ${backToUploadButton} |
|
43 |
${location}= Get Location |
|
44 |
Should Be Equal As Strings ${location} ${UPLOAD FILES URL} |
sources/src/main/webapp/tests/node-excluding.robot | ||
---|---|---|
1 | 1 |
*** Settings *** |
2 | 2 |
Documentation A test suite with tests of node excluding functionality. |
3 |
... |
|
4 |
... This test has a workflow that is created using keywords in |
|
5 |
... the imported resource file. |
|
6 |
... |
|
3 |
|
|
7 | 4 |
Suite Setup Open Browser To Demo Diagram |
5 |
Suite Teardown Close Browser |
|
8 | 6 |
Test Setup Select Radio Button actionMove exclude |
9 | 7 |
Test Teardown Reload Diagram Screen |
10 |
Suite Teardown Close Browser |
|
8 |
|
|
11 | 9 |
Resource common.robot |
12 | 10 |
|
11 |
|
|
13 | 12 |
*** Variables *** |
14 |
${vertexToGroupButton} //button[@id='vertexToGroup'] |
|
13 |
${vertexToGroupButton} //button[@id="vertexToGroup"] |
|
14 |
|
|
15 |
${excludedNodeList} //div[@id="excludedNodeListComponent"] |
|
15 | 16 |
|
16 |
${excludedNodeList} //div[@id='excludedNodeListComponent']
|
|
17 |
${includeAllButton} //button[contains(@class, "include-all-button")]
|
|
17 | 18 |
|
18 |
${includeAllButton} //button[contains(@class, 'include-all-button')] |
|
19 |
${vertex2013} //*[name()="svg"][contains(@class, "vertex")][@data-id="2013"] |
|
20 |
${excludedVertex2013} //li[contains(@class, "vertex")][@data-id="2013"] |
|
21 |
${vertex2014} //*[name()="svg"][contains(@class, "vertex")][@data-id="2014"] |
|
22 |
${excludedVertex2014} //li[contains(@class, "vertex")][@data-id="2014"] |
|
19 | 23 |
|
20 |
${vertex5} //*[name()='svg'][contains(@class, 'vertex')][@data-id='5'] |
|
21 |
${excludedVertex5} //li[contains(@class, 'vertex')][@data-id='5'] |
|
22 |
${vertex6} //*[name()='svg'][contains(@class, 'vertex')][@data-id='6'] |
|
23 |
${excludedVertex6} //li[contains(@class, 'vertex')][@data-id='6'] |
|
24 |
${group1} //*[name()="svg"][contains(@class, "group")][@data-id="1"] |
|
25 |
${excludedGroup1} //li[contains(@class, "group")][@data-id="1"] |
|
24 | 26 |
|
25 |
${group1} //*[name()='svg'][contains(@class, 'group')][@data-id='1'] |
|
26 |
${excludedGroup1} //li[contains(@class, 'group')][@data-id='1'] |
|
27 | 27 |
|
28 | 28 |
*** Test Cases *** |
29 | 29 |
Exclude Vertex |
30 |
Click Element ${vertex6} |
|
31 |
Element Should Not Be Visible ${vertex6} |
|
32 |
Element Should Be Visible ${excludedNodeList}${excludedVertex6} |
|
30 |
Click Element ${vertex2014} |
|
31 |
Element Should Not Be Visible ${vertex2014} |
|
32 |
Element Should Be Visible ${excludedNodeList}${excludedVertex2014} |
|
33 |
|
|
33 | 34 |
|
34 | 35 |
Exclude Group |
35 |
Click Element ${vertexToGroupButton} |
|
36 |
Click Element ${group1} |
|
36 |
Click Element ${vertexToGroupButton}
|
|
37 |
Click Element ${group1}
|
|
37 | 38 |
Element Should Not Be Visible ${group1} |
38 |
Element Should Be Visible ${excludedNodeList}${excludedGroup1} |
|
39 |
Element Should Be Visible ${excludedNodeList}${excludedGroup1} |
|
40 |
|
|
39 | 41 |
|
40 | 42 |
Include All Excluded Nodes |
41 |
Click Element ${vertex5} |
|
42 |
Click Element ${vertex6} |
|
43 |
Click Element ${excludedNodeList}${includeAllButton} |
|
44 |
Element Should Be Visible ${vertex5} |
|
45 |
Element Should Not Be Visible ${excludedNodeList}${excludedVertex5} |
|
46 |
Element Should Be Visible ${vertex6} |
|
47 |
Element Should Not Be Visible ${excludedNodeList}${excludedVertex6} |
|
48 |
|
|
49 |
*** Keywords *** |
|
43 |
Click Element ${vertex2013} |
|
44 |
Click Element ${vertex2014} |
|
45 |
Click Element ${excludedNodeList}${includeAllButton} |
|
46 |
Element Should Be Visible ${vertex2013} |
|
47 |
Element Should Not Be Visible ${excludedNodeList}${excludedVertex2013} |
|
48 |
Element Should Be Visible ${vertex2014} |
|
49 |
Element Should Not Be Visible ${excludedNodeList}${excludedVertex2014} |
sources/src/main/webapp/tests/search.robot | ||
---|---|---|
1 | 1 |
*** Settings *** |
2 | 2 |
Documentation A test suite with tests of node search. |
3 |
... |
|
4 |
... This test has a workflow that is created using keywords in |
|
5 |
... the imported resource file. |
|
6 |
... |
|
3 |
|
|
7 | 4 |
Suite Setup Open Browser To Demo Diagram |
8 |
Test Teardown Reload Diagram Screen |
|
9 | 5 |
Suite Teardown Close Browser |
6 |
Test Teardown Reload Diagram Screen |
|
7 |
|
|
10 | 8 |
Resource common.robot |
11 | 9 |
|
10 |
|
|
12 | 11 |
*** Variables *** |
13 |
${searchInputField} //input[@id='searchText'] |
|
14 |
${searchButton} //button[@id='search'] |
|
15 |
${searchCounter} //span[@id='countOfFound'] |
|
12 |
${searchInputField} //input[@id="searchText"] |
|
13 |
${searchButton} //button[@id="search"] |
|
14 |
${searchCounter} //span[@id="countOfFound"] |
|
15 |
|
|
16 |
${vertex2015} //*[name()="svg"][@data-id="2015"] |
|
17 |
${vertex2039} //*[name()="svg"][@data-id="2039"] |
|
16 | 18 |
|
17 |
${vertex1} //*[name()='svg'][@data-id='1'] |
|
18 |
${vertex2} //*[name()='svg'][@data-id='2'] |
|
19 |
${vertex3} //*[name()='svg'][@data-id='3'] |
|
20 |
${vertex4} //*[name()='svg'][@data-id='4'] |
|
21 |
${vertex5} //*[name()='svg'][@data-id='5'] |
|
22 |
${vertex6} //*[name()='svg'][@data-id='6'] |
|
23 | 19 |
|
24 | 20 |
*** Test Cases *** |
25 | 21 |
Search vertex using enter key |
26 |
Input Text ${searchInputField} obcc-parking-example
|
|
22 |
Input Text ${searchInputField} Product
|
|
27 | 23 |
# press enter |
28 |
Press Key ${searchInputField} \\13 |
|
24 |
Press Key ${searchInputField} \\13
|
|
29 | 25 |
# check counter of found nodes |
30 |
${found}= Get Text ${searchCounter} |
|
31 |
Should Be Equal As Strings ${found} 4 |
|
32 |
# check CSS classes of (not) found nodes |
|
33 |
Element Should Have Class ${vertex1} vertex--found |
|
34 |
Element Should Have Class ${vertex2} vertex--found |
|
35 |
Element Should Have Class ${vertex3} vertex--found |
|
36 |
Element Should Have Class ${vertex5} vertex--found |
|
37 |
Element Should Not Have Class ${vertex6} vertex--found |
|
26 |
${found}= Get Text ${searchCounter} |
|
27 |
Should Be Equal As Strings ${found} 2 |
|
28 |
# check CSS classes of found nodes |
|
29 |
Element Should Have Class ${vertex2015} node--found |
|
30 |
Element Should Have Class ${vertex2039} node--found |
|
31 |
|
|
38 | 32 |
|
39 | 33 |
Search vertex using button |
40 |
Input Text ${searchInputField} obcc-parking-example
|
|
34 |
Input Text ${searchInputField} Product
|
|
41 | 35 |
Click Element ${searchButton} |
42 | 36 |
# check counter of found nodes |
43 |
${found}= Get Text ${searchCounter} |
|
44 |
Should Be Equal As Strings ${found} 4 |
|
45 |
# check CSS classes of (not) found nodes |
|
46 |
Element Should Have Class ${vertex1} vertex--found |
|
47 |
Element Should Have Class ${vertex2} vertex--found |
|
48 |
Element Should Have Class ${vertex3} vertex--found |
|
49 |
Element Should Have Class ${vertex5} vertex--found |
|
50 |
Element Should Not Have Class ${vertex6} vertex--found |
|
37 |
${found}= Get Text ${searchCounter} |
|
38 |
Should Be Equal As Strings ${found} 2 |
|
39 |
# check CSS classes of found nodes |
|
40 |
Element Should Have Class ${vertex2015} node--found |
|
41 |
Element Should Have Class ${vertex2039} node--found |
|
42 |
|
|
51 | 43 |
|
52 | 44 |
Reset search using escape key |
53 |
Input Text ${searchInputField} obcc-parking-example
|
|
54 |
Click Element ${searchButton} |
|
45 |
Input Text ${searchInputField} Product
|
|
46 |
Click Element ${searchButton}
|
|
55 | 47 |
# press escape |
56 |
Press Key ${searchInputField} \\27 |
|
48 |
Press Key ${searchInputField} \\27
|
|
57 | 49 |
# check counter of found nodes |
58 | 50 |
${found}= Get Text ${searchCounter} |
59 |
Should Be Equal As Strings ${found} 0 |
|
51 |
Should Be Equal As Strings ${found} 0
|
|
60 | 52 |
# check that no nodes are found |
61 |
Element Should Not Have Class ${vertex1} vertex--found |
|
62 |
Element Should Not Have Class ${vertex2} vertex--found |
|
63 |
Element Should Not Have Class ${vertex3} vertex--found |
|
64 |
Element Should Not Have Class ${vertex5} vertex--found |
|
65 |
Element Should Not Have Class ${vertex6} vertex--found |
|
53 |
Element Should Not Have Class ${vertex2015} node--found |
|
54 |
Element Should Not Have Class ${vertex2039} node--found |
|
55 |
|
|
66 | 56 |
|
67 | 57 |
Reset search using counter click |
68 |
Input Text ${searchInputField} obcc-parking-example
|
|
69 |
Click Element ${searchButton} |
|
70 |
Click Element ${searchCounter} |
|
58 |
Input Text ${searchInputField} Product
|
|
59 |
Click Element ${searchButton}
|
|
60 |
Click Element ${searchCounter}
|
|
71 | 61 |
# check counter of found nodes |
72 | 62 |
${found}= Get Text ${searchCounter} |
73 |
Should Be Equal As Strings ${found} 0 |
|
63 |
Should Be Equal As Strings ${found} 0
|
|
74 | 64 |
# check that no nodes are found |
75 |
Element Should Not Have Class ${vertex1} vertex--found |
|
76 |
Element Should Not Have Class ${vertex2} vertex--found |
|
77 |
Element Should Not Have Class ${vertex3} vertex--found |
|
78 |
Element Should Not Have Class ${vertex5} vertex--found |
|
79 |
Element Should Not Have Class ${vertex6} vertex--found |
|
80 |
|
|
81 |
*** Keywords *** |
|
65 |
Element Should Not Have Class ${vertex2015} vertex--found |
|
66 |
Element Should Not Have Class ${vertex2039} vertex--found |
sources/src/main/webapp/tests/sidebar.robot | ||
---|---|---|
1 | 1 |
*** Settings *** |
2 | 2 |
Documentation A test suite with tests of sidebar panels toggling. |
3 |
... |
|
4 |
... This test has a workflow that is created using keywords in |
|
5 |
... the imported resource file. |
|
6 |
... |
|
3 |
|
|
7 | 4 |
Suite Setup Open Browser To Demo Diagram |
8 | 5 |
Suite Teardown Close Browser |
6 |
|
|
9 | 7 |
Resource common.robot |
10 | 8 |
|
9 |
|
|
11 | 10 |
*** Variables *** |
12 |
${sidebar} //div[@id='sidebar']
|
|
11 |
${sidebar} //div[@id="sidebar"]
|
|
13 | 12 |
|
14 |
${changeButton} //button[@id='changeButton'] |
|
15 |
${postponedButton} //button[@id='postponedButton'] |
|
16 |
${unconnectedButton} //button[@id='unconnectedButton'] |
|
17 |
${missingButton} //button[@id='missingButton'] |
|
13 |
${unconnectedButton} //button[@id="unconnectedButton"] |
|
14 |
${unconnectedNodeList} //div[@id="unconnectedNodeListComponent"] |
|
18 | 15 |
|
19 |
${activeChange} //div[@id='activeChange'] |
|
20 |
${postponedChangeList} //div[@id='postponedChangeListComponent'] |
|
21 |
${unconnectedNodeList} //div[@id='unconnectedNodeListComponent'] |
|
22 |
${missingClassList} //div[@id='missingClassListComponent'] |
|
16 |
${includeAllButton} //button[contains(@class, "include-all-button")] |
|
17 |
${excludeAllButton} //button[contains(@class, "exclude-all-button")] |
|
23 | 18 |
|
24 |
${includeAllButton} //button[contains(@class, 'include-all-button')]
|
|
25 |
${excludeAllButton} //button[contains(@class, 'exclude-all-button')]
|
|
19 |
${vertex0} //*[name()="svg"][contains(@class, "vertex")][@data-id="0"]
|
|
20 |
${excludedVertex0} //li[contains(@class, "vertex")][@data-id="0"]
|
|
26 | 21 |
|
27 |
${vertex4} //*[name()='svg'][contains(@class, 'vertex')][@data-id='4'] |
|
28 |
${excludedVertex4} //li[contains(@class, 'vertex')][@data-id='4'] |
|
29 | 22 |
|
30 | 23 |
*** Test Cases *** |
31 |
Toggle Active Change |
|
32 |
Element Should Not Have Class ${activeChange} hidden |
|
33 |
Click Element ${changeButton} |
|
34 |
Element Should Have Class ${activeChange} hidden |
|
35 |
|
|
36 |
Toggle Postponed Changes |
|
37 |
Element Should Have Class ${postponedChangeList} hidden |
|
38 |
Click Element ${postponedButton} |
|
39 |
Element Should Not Have Class ${postponedChangeList} hidden |
|
40 |
|
|
41 | 24 |
Toggle Unconnected Nodes |
42 |
Element Should Have Class ${unconnectedNodeList} hidden |
|
43 |
Click Element ${unconnectedButton} |
|
25 |
Element Should Have Class ${unconnectedNodeList} hidden
|
|
26 |
Click Element ${unconnectedButton}
|
|
44 | 27 |
Element Should Not Have Class ${unconnectedNodeList} hidden |
28 |
Click Element ${unconnectedButton} |
|
29 |
Element Should Have Class ${unconnectedNodeList} hidden |
|
45 | 30 |
|
46 |
Toggle Missing Classes |
|
47 |
Element Should Have Class ${missingClassList} hidden |
|
48 |
Click Element ${missingButton} |
|
49 |
Element Should Not Have Class ${missingClassList} hidden |
|
50 | 31 |
|
51 | 32 |
Include And Exclude All Unconnected Vertices |
52 |
Click Element ${unconnectedButton} |
|
53 |
Element Should Not Be Visible ${vertex4}
|
|
54 |
Element Should Be Visible ${unconnectedNodeList}${excludedVertex4}
|
|
33 |
Click Element ${unconnectedButton}
|
|
34 |
Element Should Not Be Visible ${vertex0}
|
|
35 |
Element Should Be Visible ${unconnectedNodeList}${excludedVertex0}
|
|
55 | 36 |
# include all unconnected vertices |
56 |
Click Element ${unconnectedNodeList}${includeAllButton} |
|
57 |
Element Should Be Visible ${vertex4}
|
|
58 |
Element Should Not Be Visible ${unconnectedNodeList}${excludedVertex4}
|
|
37 |
Click Element ${unconnectedNodeList}${includeAllButton}
|
|
38 |
Element Should Be Visible ${vertex0}
|
|
39 |
Element Should Not Be Visible ${unconnectedNodeList}${excludedVertex0}
|
|
59 | 40 |
# exclude all unconnected vertices |
60 |
Click Element ${unconnectedNodeList}${excludeAllButton} |
|
61 |
Element Should Not Be Visible ${vertex4} |
|
62 |
Element Should Be Visible ${unconnectedNodeList}${excludedVertex4} |
|
63 |
|
|
64 |
*** Keywords *** |
|
41 |
Click Element ${unconnectedNodeList}${excludeAllButton} |
|
42 |
Element Should Not Be Visible ${vertex0} |
|
43 |
Element Should Be Visible ${unconnectedNodeList}${excludedVertex0} |
|
44 |
Click Element ${unconnectedButton} |
sources/src/main/webapp/tests/vertex.robot | ||
---|---|---|
1 | 1 |
*** Settings *** |
2 | 2 |
Documentation A test suite with tests of vertex actions. |
3 |
... |
|
4 |
... This test has a workflow that is created using keywords in |
|
5 |
... the imported resource file. |
|
6 |
... |
|
3 |
|
|
7 | 4 |
Suite Setup Open Browser To Demo Diagram |
8 | 5 |
Suite Teardown Close Browser |
6 |
|
|
9 | 7 |
Resource common.robot |
10 | 8 |
|
9 |
|
|
11 | 10 |
*** Variables *** |
12 |
${zoomInButton} //button[@id='zoomIn']
|
|
11 |
${zoomInButton} //button[@id="zoomIn"]
|
|
13 | 12 |
|
14 |
${vertex1} //*[name()='svg'][contains(@class, 'vertex')][@data-id='1'] |
|
15 |
${vertex2} //*[name()='svg'][contains(@class, 'vertex')][@data-id='2'] |
|
16 |
${vertex3} //*[name()='svg'][contains(@class, 'vertex')][@data-id='3'] |
|
17 |
${vertex4} //*[name()='svg'][contains(@class, 'vertex')][@data-id='4'] |
|
18 |
${vertex5} //*[name()='svg'][contains(@class, 'vertex')][@data-id='5'] |
|
19 |
${vertex6} //*[name()='svg'][contains(@class, 'vertex')][@data-id='6'] |
|
13 |
${vertex9} //*[name()="svg"][contains(@class, "vertex")][@data-id="9"] |
|
14 |
${vertex58} //*[name()="svg"][contains(@class, "vertex")][@data-id="58"] |
|
15 |
${vertex2014} //*[name()="svg"][contains(@class, "vertex")][@data-id="2014"] |
|
20 | 16 |
|
21 |
${vertexInterface} /*[name()='g'][@class='interface'] |
|
17 |
${vertexArchetypeIcon} /*[name()="g"][@class="archetype-icon"] |
|
18 |
|
|
19 |
${vertexPopover} //div[contains(@class, "vertex-popover")] |
|
22 | 20 |
|
23 |
${vertexPopover} //div[contains(@class, 'vertex-popover')] |
|
24 | 21 |
|
25 | 22 |
*** Test Cases *** |
26 | 23 |
Highlight Vertex |
27 |
Click Element ${vertex3}
|
|
24 |
Click Element ${vertex58}
|
|
28 | 25 |
# check that other vertices are either highlighted or dimmed |
29 |
Element Should Have Class ${vertex1} node--highlighted-provided |
|
30 |
Element Should Have Class ${vertex2} node--dimmed |
|
31 |
Element Should Have Class ${vertex3} node--highlighted |
|
32 |
Element Should Have Class ${vertex5} node--dimmed |
|
33 |
Element Should Have Class ${vertex6} node--highlighted-required |
|
26 |
Element Should Have Class ${vertex9} node--highlighted-required |
|
27 |
Element Should Have Class ${vertex58} node--highlighted |
|
28 |
Element Should Have Class ${vertex2014} node--dimmed |
|
34 | 29 |
# unhighlight |
35 |
Click Element ${vertex3}
|
|
30 |
Click Element ${vertex58}
|
|
36 | 31 |
# check that other vertices are back to normal |
37 |
Element Should Not Have Class ${vertex1} node--highlighted-provided |
|
38 |
Element Should Not Have Class ${vertex2} node--dimmed |
|
39 |
Element Should Not Have Class ${vertex3} node--highlighted |
|
40 |
Element Should Not Have Class ${vertex5} node--dimmed |
|
41 |
Element Should Not Have Class ${vertex6} node--highlighted-required |
|
32 |
Element Should Not Have Class ${vertex9} node--highlighted-required |
|
33 |
Element Should Not Have Class ${vertex58} node--highlighted |
|
34 |
Element Should Not Have Class ${vertex2014} node--dimmed |
|
35 |
|
|
42 | 36 |
|
43 | 37 |
Mouse Down Vertex |
44 |
Mouse Down ${vertex3} |
|
45 |
Element Should Have Class ${vertex3} node--dragged |
|
46 |
Mouse Up ${vertex3} |
|
47 |
Element Should Not Have Class ${vertex3} node--dragged |
|
38 |
Mouse Down ${vertex2014} |
|
39 |
Element Should Have Class ${vertex2014} node--dragged |
|
40 |
Mouse Up ${vertex2014} |
|
41 |
Element Should Not Have Class ${vertex2014} node--dragged |
|
42 |
|
|
48 | 43 |
|
49 | 44 |
Drag Vertex |
50 | 45 |
# zoom in to 100% to get correct coordinates |
51 |
Click Element ${zoomInButton} |
|
52 |
Click Element ${zoomInButton} |
|
46 |
Click Element ${zoomInButton}
|
|
47 |
Click Element ${zoomInButton}
|
|
53 | 48 |
# get old vertex coordinates |
54 |
${oldX}= Get Element Attribute ${vertex3} x
|
|
55 |
${oldX}= Convert To Number ${oldX} 2 |
|
56 |
${oldY}= Get Element Attribute ${vertex3} y
|
|
57 |
${oldY}= Convert To Number ${oldY} 2 |
|
49 |
${oldX}= Get Element Attribute ${vertex2014} x
|
|
50 |
${oldX}= Convert To Number ${oldX} 2
|
|
51 |
${oldY}= Get Element Attribute ${vertex2014} y
|
|
52 |
${oldY}= Convert To Number ${oldY} 2
|
|
58 | 53 |
# move vertex by 10 pixels in both directions |
59 |
Drag And Drop By Offset ${vertex3} 10 10
|
|
54 |
Drag And Drop By Offset ${vertex2014} 10 10
|
|
60 | 55 |
# get new vertex coordinates |
61 |
${newX}= Get Element Attribute ${vertex3} x
|
|
62 |
${newX}= Convert To Number ${newX} 2 |
|
63 |
${newY}= Get Element Attribute ${vertex3} y
|
|
64 |
${newY}= Convert To Number ${newY} 2 |
|
56 |
${newX}= Get Element Attribute ${vertex2014} x
|
|
57 |
${newX}= Convert To Number ${newX} 2
|
|
58 |
${newY}= Get Element Attribute ${vertex2014} y
|
|
59 |
${newY}= Convert To Number ${newY} 2
|
|
65 | 60 |
# check that offset matches |
66 |
Should Be Equal As Numbers ${oldX + 10} ${newX} |
|
67 |
Should Be Equal As Numbers ${oldY + 10} ${newY} |
|
61 |
Should Be Equal As Numbers ${oldX + 10} ${newX} |
|
62 |
Should Be Equal As Numbers ${oldY + 10} ${newY} |
|
63 |
|
|
68 | 64 |
|
69 | 65 |
Display Vertex Popover |
70 |
Click Element ${vertex3}${vertexInterface} |
|
71 |
Element Should Be Visible ${vertexPopover} |
|
72 |
Element Should Not Have Class ${vertexPopover} hidden |
|
66 |
Click Element ${vertex2014}${vertexArchetypeIcon} |
|
67 |
Element Should Be Visible ${vertexPopover} |
|
68 |
Element Should Not Have Class ${vertexPopover} hidden |
|
69 |
Mouse Out ${vertexPopover} |
|
70 |
|
|
73 | 71 |
|
74 | 72 |
Hide Vertex Popover By Moving Mouse Out |
75 |
Click Element ${vertex3}${vertexInterface}
|
|
76 |
Mouse Out ${vertexPopover} |
|
73 |
Click Element ${vertex2014}${vertexArchetypeIcon}
|
|
74 |
Mouse Out ${vertexPopover}
|
|
77 | 75 |
Element Should Not Be Visible ${vertexPopover} |
78 |
Element Should Have Class ${vertexPopover} hidden |
|
76 |
Element Should Have Class ${vertexPopover} hidden |
|
77 |
|
|
79 | 78 |
|
80 | 79 |
Hide Vertex Popover By Clicking Elsewhere |
81 |
Click Element ${vertex3}${vertexInterface}
|
|
82 |
Click Element //body |
|
80 |
Click Element ${vertex2014}${vertexArchetypeIcon}
|
|
81 |
Click Element //body
|
|
83 | 82 |
Element Should Not Be Visible ${vertexPopover} |
84 |
Element Should Have Class ${vertexPopover} hidden |
|
85 |
|
|
86 |
*** Keywords *** |
|
83 |
Element Should Have Class ${vertexPopover} hidden |
sources/src/main/webapp/tests/zoom.robot | ||
---|---|---|
1 | 1 |
*** Settings *** |
2 | 2 |
Documentation A test suite with tests of graph zoom. |
3 |
... |
|
4 |
... This test has a workflow that is created using keywords in |
|
5 |
... the imported resource file. |
|
6 |
... |
|
3 |
|
|
7 | 4 |
Library String |
5 |
|
|
8 | 6 |
Suite Setup Open Browser To Demo Diagram |
9 |
Test Teardown Reload Diagram Screen |
|
10 | 7 |
Suite Teardown Close Browser |
8 |
Test Teardown Reload Diagram Screen |
|
9 |
|
|
11 | 10 |
Resource common.robot |
12 | 11 |
|
12 |
|
|
13 | 13 |
*** Variables *** |
14 |
${defaultZoom} ${80} |
|
15 |
${minZoom} ${10} |
|
16 |
${maxZoom} ${500} |
|
14 |
${defaultZoom} ${80}
|
|
15 |
${minZoom} ${10}
|
|
16 |
${maxZoom} ${500}
|
|
17 | 17 |
|
18 |
${graphWrapper} //*[name()='g'][@id='graph'] |
|
18 |
${graphWrapper} //*[name()="g"][@id="graph"] |
|
19 |
|
|
20 |
${zoomInButton} //button[@id="zoomIn"] |
|
21 |
${zoomOutButton} //button[@id="zoomOut"] |
|
22 |
${zoomValue} //span[@id="zoomValue"] |
|
19 | 23 |
|
20 |
${zoomInButton} //button[@id='zoomIn'] |
|
21 |
${zoomOutButton} //button[@id='zoomOut'] |
|
22 |
${zoomValue} //span[@id='zoomValue'] |
|
23 | 24 |
|
24 | 25 |
*** Test Cases *** |
25 | 26 |
Zoom In |
26 | 27 |
Click Element ${zoomInButton} |
27 | 28 |
Zoom Should Be Equal ${defaultZoom + 10} |
28 | 29 |
|
30 |
|
|
29 | 31 |
Zoom In Constraint |
30 | 32 |
# zoom in to maximum (there are 12 steps between default and maximum zoom level) |
31 | 33 |
Repeat Keyword 12 Click Element ${zoomInButton} |
32 | 34 |
Zoom Should Be Equal ${maxZoom} |
33 | 35 |
Element Should Have Class ${zoomInButton} disabled |
34 | 36 |
|
37 |
|
|
35 | 38 |
Zoom Out |
36 | 39 |
Click Element ${zoomOutButton} |
37 | 40 |
Zoom Should Be Equal ${defaultZoom - 10} |
38 | 41 |
|
42 |
|
|
39 | 43 |
Zoom Out Constraint |
40 | 44 |
# zoom out to minimum (there are 5 steps between default and minimum zoom level) |
41 | 45 |
Repeat Keyword 5 Click Element ${zoomOutButton} |
42 | 46 |
Zoom Should Be Equal ${minZoom} |
43 | 47 |
Element Should Have Class ${zoomOutButton} disabled |
44 | 48 |
|
49 |
|
|
45 | 50 |
*** Keywords *** |
46 | 51 |
Zoom Should Be Equal |
47 | 52 |
[Arguments] ${expectedScale} |
Také k dispozici: Unified diff
fixed Robot Framework UI tests