diff --git a/end_to_end_tests/resources/general_keywords/navigation.robot b/end_to_end_tests/resources/general_keywords/navigation.robot index 4bee696e..cd22a4cb 100644 --- a/end_to_end_tests/resources/general_keywords/navigation.robot +++ b/end_to_end_tests/resources/general_keywords/navigation.robot @@ -38,10 +38,28 @@ Open history page of series Should be equal as Strings ${url} ${str} Wait Until Element is Enabled ${lastRunInfo} +Open history page of series with url params + [Arguments] ${series} ${offset} ${numberofbuilds} + ${str}= Catenate SEPARATOR= ${history_url} ${series} /history ?offset= ${offset} &numberofbuilds= ${numberofbuilds} + Current Page Is url=${str} + ${url}= Get Location + Set Suite Variable ${navigated_series} ${series} + Should be equal as Strings ${url} ${str} + Wait Until Element is Enabled ${lastRunInfo} + + +Open history page of series with checkbox set + [Arguments] ${series} ${boolean} + ${str}= Catenate SEPARATOR= ${history_url} ${series} /history ?tag= ${boolean} + Current Page Is url=${str} + ${url}= Get Location + Set Suite Variable ${navigated_series} ${series} + Should be equal as Strings ${url} ${str} + Wait Until Element is Enabled ${lastRunInfo} Open overview page of series [Arguments] ${series} - ${str}= Catenate SEPARATOR= ${history_url} ${series} /overview + ${str}= Catenate SEPARATOR= ${history_url} ${series} /overview Current Page Is url=${str} ${url}= Get Location Set Suite Variable ${navigated_series} ${series} diff --git a/end_to_end_tests/resources/page_locators/history_page.robot b/end_to_end_tests/resources/page_locators/history_page.robot index 6410dbc0..5d1c666c 100644 --- a/end_to_end_tests/resources/page_locators/history_page.robot +++ b/end_to_end_tests/resources/page_locators/history_page.robot @@ -19,4 +19,9 @@ ${series_history_third_recent} //*[@id="history-table-head"]/tr/th[5]/a ${enabled_offset_right} xpath://*[contains(@class, 'rightfalse')] ${enabled_offset_left} xpath://*[contains(@class, 'leftfalse')] ${disabled_offset_right} xpath://*[contains(@class, 'rightrue')] -${disabled_offset_left} xpath://*[contains(@class, 'leftrue')] \ No newline at end of file +${disabled_offset_left} xpath://*[contains(@class, 'leftrue')] + + +${clicked_pass} xpath://*[contains(@class, 'passtrue')] + +${clicked_fail} xpath://*[contains(@class, 'failtrue')] \ No newline at end of file diff --git a/end_to_end_tests/robot_tests/frontend/history_page_tests/history_keywords.robot b/end_to_end_tests/robot_tests/frontend/history_page_tests/history_keywords.robot new file mode 100644 index 00000000..ffe242f2 --- /dev/null +++ b/end_to_end_tests/robot_tests/frontend/history_page_tests/history_keywords.robot @@ -0,0 +1,33 @@ +***Keywords*** + +Table should be limited to + [Arguments] ${number} + Wait Until Element Is Enabled ${table_header_xpath} + ${elements} = Get Element Count ${table_header_xpath} + ${sum} = Evaluate ${number} + 2 + Should be True ${sum}>=${elements} + +Set Offset field to + [Arguments] ${text} + Input Text ${offset_field} ${text} + +Left Button Should be disabled + Wait Until Element Is Visible ${offset_left} + ${count}= Get Element Count ${disabled_offset_left} + Should be equal as Integers ${count} 0 + +Left Button Should be enabled + Wait Until Element Is Enabled ${offset_left} + ${count}= Get Element Count ${enabled_offset_left} + Should be equal as Integers ${count} 1 + +Right Button Should be enabled + Wait Until Element Is Enabled ${offset_right} + ${count}= Get Element Count ${enabled_offset_right} + Should be equal as Integers ${count} 1 + +Right Button Should be disabled + Wait Until Element Is Visible ${offset_right} + ${count}= Get Element Count ${disabled_offset_right} + Should be equal as Integers ${count} 0 + \ No newline at end of file diff --git a/end_to_end_tests/robot_tests/frontend/history_page_tests/test_buttons.robot b/end_to_end_tests/robot_tests/frontend/history_page_tests/test_buttons.robot index 648457fc..0a978d06 100644 --- a/end_to_end_tests/robot_tests/frontend/history_page_tests/test_buttons.robot +++ b/end_to_end_tests/robot_tests/frontend/history_page_tests/test_buttons.robot @@ -1,7 +1,7 @@ ***Settings*** Resource ../../../resources/resource.robot - +Resource ./history_keywords.robot *** Test Cases *** Test Build Amount Dropdown @@ -39,8 +39,6 @@ Test Offset Functionality Offset should be 0 Most Recent Build Number should be ${most_recent_build} -#Test Offset Functionality with Offset URL, to be added - *** Keywords *** Select From Dropdown @@ -57,13 +55,6 @@ Browser is on a history page of series ${url}= Get Location Should be equal as Strings ${url} ${str} -Table should be limited to - [Arguments] ${number} - Wait Until Element Is Enabled ${table_header_xpath} - ${elements} = Get Element Count ${table_header_xpath} - ${sum} = Evaluate ${number} + 2 - Should be True ${sum}>=${elements} - Store Most Recent Builds Wait Until Element Is Enabled ${series_history_most_recent} ${temp_most_recent}= Get Text ${series_history_most_recent} @@ -81,10 +72,6 @@ Most Recent Build Number should be Should be equal as Strings ${build} ${temp_most_recent} -Set Offset field to - [Arguments] ${text} - Input Text ${offset_field} ${text} - Offset should be [Arguments] ${value} ${url}= Get Location @@ -96,26 +83,6 @@ Check offset url ${full_string}= Catenate SEPARATOR= offset = ${value} Should Contain ${url} ${full_string} -Left Button Should be disabled - Wait Until Element Is Visible ${offset_left} - ${count}= Get Element Count ${disabled_offset_left} - Should be equal as Integers ${count} 0 - -Left Button Should be enabled - Wait Until Element Is Enabled ${offset_left} - ${count}= Get Element Count ${enabled_offset_left} - Should be equal as Integers ${count} 1 - -Right Button Should be enabled - Wait Until Element Is Enabled ${offset_right} - ${count}= Get Element Count ${enabled_offset_right} - Should be equal as Integers ${count} 1 - -Right Button Should be disabled - Wait Until Element Is Visible ${offset_right} - ${count}= Get Element Count ${disabled_offset_right} - Should be equal as Integers ${count} 0 - Click Right Button Click Element ${offset_right} Click Left Button diff --git a/end_to_end_tests/robot_tests/frontend/history_page_tests/url_navigation.robot b/end_to_end_tests/robot_tests/frontend/history_page_tests/url_navigation.robot index b54bd78d..2df06e30 100644 --- a/end_to_end_tests/robot_tests/frontend/history_page_tests/url_navigation.robot +++ b/end_to_end_tests/robot_tests/frontend/history_page_tests/url_navigation.robot @@ -1,6 +1,7 @@ ***Settings*** Resource ../../../resources/resource.robot +Resource ./history_keywords.robot ***Test Cases*** @@ -8,5 +9,45 @@ Test Url Navigation Current Page Is url=${URL} Wait Until Page Contains Epimetheus Wait Until Element Contains ${HELP_PAGE_WELCOME_ELEMENT} Welcome - Click Element ${NAV_TEAM} + Click Element ${NAV_TEAM} + +Test Series History Url Navigation With Offset Parameters + Open history page of series with url params 3 0 5 + Table should be limited to number=5 + Left Button Should be disabled + + Open history page of series with url params 3 1 10 + Table should be limited to number=10 + Left Button Should be enabled + Set Offset field to 1 + Left Button Should be enabled + Set Offset field to 2 + Left Button Should be disabled + + Open history page of series with url params 3 2 15 + Table should be limited to number=15 + Left Button Should be enabled + Set Offset field to 2 + Left Button Should be enabled + Set Offset field to 3 + Left Button Should be disabled + +Test Series History Url Navigation With Failing + Open history page of series with checkbox set 3 Passing + Checkbox is ticked for Passing + + Open history page of series with checkbox set 3 Failing + Checkbox is ticked for Failing + + +***Keywords*** + +Checkbox is ticked for + [Arguments] ${status} + Wait Until Element Is Enabled ${fail_checkbox_locator} + ${path}= Set Variable If '${status}' == 'Passing' ${clicked_pass} ${clicked_fail} + Log ${status} Warn + Log ${path} Warn + ${count}= Get Element Count ${path} + Should be Equal As Numbers ${count} 1 diff --git a/frontend/src/components/buildTable/Table.jsx b/frontend/src/components/buildTable/Table.jsx index 19768ff5..d586bc2b 100644 --- a/frontend/src/components/buildTable/Table.jsx +++ b/frontend/src/components/buildTable/Table.jsx @@ -17,7 +17,7 @@ const Table = ({ id }) => { {t('build.table.status')}