|
1 | 1 | *** Settings *** |
2 | 2 | Documentation Verifies automatic injection & waiting features |
3 | 3 | Suite Setup Start Flask App |
4 | | -Suite Teardown Final Report |
| 4 | +Suite Teardown Internal Suite Teardown |
5 | 5 | Test Template Automatically Call Testability Ready |
6 | | -Library SeleniumLibrary timeout=2 seconds plugins=${CURDIR}/../src/SeleniumTestability;True;29 seconds;False |
| 6 | +Library SeleniumLibrary plugins=${CURDIR}/../src/SeleniumTestability;True;60 seconds;False |
7 | 7 | Library Timer |
8 | 8 | Resource resources.robot |
9 | 9 |
|
10 | 10 | *** Test Cases *** |
11 | | -Testability in Firefox |
12 | | - ${FF} 20 seconds 30 seconds |
| 11 | +Verify Fetch In Firefox |
| 12 | + ${FF} fetch not executed executed at least once 3.5 4.5 |
13 | 13 |
|
14 | | -Testability in Chrome |
15 | | - ${GC} 20 seconds 30 seconds |
| 14 | +Verify Timeout In Firefox |
| 15 | + ${FF} shorttimeout not executed executed at least once 3.5 4.5 |
| 16 | + |
| 17 | +Verify XHR In Firefox |
| 18 | + ${FF} xhr not executed executed at least once 3.5 4.5 |
| 19 | + |
| 20 | +Verify CSS Transition In Firefox |
| 21 | + ${FF} transition not executed executed at least once 3.5 4.5 |
| 22 | + |
| 23 | +Verify CSS Animation In Firefox |
| 24 | + ${FF} animate not executed executed at least once 3.5 4.5 |
| 25 | + |
| 26 | +Verify Fetch In Chrome |
| 27 | + ${GC} fetch not executed executed at least once 3.5 4.5 |
| 28 | + |
| 29 | +Verify Timeout In Chrome |
| 30 | + ${GC} shorttimeout not executed executed at least once 3.5 4.5 |
| 31 | + |
| 32 | +Verify XHR In Chrome |
| 33 | + ${GC} xhr not executed executed at least once 3.5 4.5 |
| 34 | + |
| 35 | +Verify CSS Transition In Chrome |
| 36 | + ${GC} transition not executed executed at least once 3.5 4.5 |
| 37 | + |
| 38 | +Verify CSS Animation In Chrome |
| 39 | + ${GC} animate not executed executed at least once 3.5 4.5 |
16 | 40 |
|
17 | 41 | *** Keywords *** |
18 | | -Final Report |
| 42 | +Add Final Benchmark Table |
19 | 43 | [Documentation] Verifies that all timers done during the suite are passing |
20 | | - Stop Flask App |
21 | 44 | Verify All Timers fail_on_errors=False |
| 45 | + |
| 46 | +Internal Suite Teardown |
| 47 | + [Documentation] Final teardown |
| 48 | + Add Final Benchmark Table |
| 49 | + Teardown Test Environment |
22 | 50 | Remove All Timers |
23 | 51 |
|
24 | 52 | Automatically Call Testability Ready |
25 | | - [Arguments] ${BROWSER} ${HIGHER_THAN} ${LOWER_THAN} |
26 | | - [Documentation] test template for automatic waiting and injection |
27 | | -
|
28 | | - &{longfetch}= Create Dictionary url=.*longfetch.* method=GET |
29 | | - @{blacklist}= Create List ${longfetch} |
30 | | - ${tc}= Create Dictionary maxTimeout=5000 blacklist=${blacklist} |
31 | | - Set Testability Config ${tc} |
32 | | - |
33 | | - Setup Web Environment ${BROWSER} ${URL} |
34 | | - Click All And Verify ${HIGHER_THAN} ${LOWER_THAN} |
35 | | - [Teardown] Teardown Web Environment |
36 | | - |
37 | | -Click All And Verify |
38 | | - [Arguments] ${HIGHER_THAN} ${LOWER_THAN} |
39 | | - [Documentation] Click and verify enough time is passing |
40 | | - Start Timer ${TEST NAME} |
41 | | - Click Element id:fetch-button |
42 | | - Click Element id:shorttimeout-button |
43 | | - Click Element id:xhr-button |
44 | | - Click Element id:transition-button |
45 | | - Click Element id:animate-button |
| 53 | + [Arguments] ${BROWSER} ${ID} ${PRE_MESSAGE} ${POST_MESSAGE} ${HIGHER_THAN} ${LOWER_THAN} |
| 54 | + [Documentation] test template for manual waiting & injection tests |
| 55 | + Setup Web Environment ${BROWSER} ${URL} |
| 56 | + Element Text Should Be id:${id}-result ${PRE_MESSAGE} |
| 57 | + Start Timer ${TEST NAME}-onClick |
| 58 | + Click Element id:${id}-button |
| 59 | + Stop Timer ${TEST NAME}-onClick |
| 60 | + Start Timer ${TEST NAME}-onGetText |
| 61 | + Element Text Should Be id:${id}-result ${POST_MESSAGE} |
| 62 | + Stop Timer ${TEST NAME}-onGetText |
| 63 | + Start Timer ${TEST NAME}-onWait |
46 | 64 | Wait For Testability Ready |
47 | | - Stop Timer ${TEST NAME} |
48 | | - Verify Single Timer ${LOWER_THAN} ${HIGHER_THAN} ${TEST NAME} |
49 | | - ${TIMEOUT}= Get Selenium Timeout |
50 | | - Should Be Equal ${TIMEOUT} 2 seconds |
| 65 | + Stop Timer ${TEST NAME}-onWait |
| 66 | + Verify Single Timer 0.5 0 ${TEST NAME}-onClick |
| 67 | + Verify Single Timer ${LOWER_THAN} ${HIGHER_THAN} ${TEST NAME}-onGetText |
| 68 | + Verify Single Timer 0.5 0 ${TEST NAME}-onWait |
| 69 | + [Teardown] Teardown Web Environment |
0 commit comments