Index: lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html =================================================================== --- lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html +++ lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html @@ -247,7 +247,7 @@   {{ + report.ts.get_field_index(field)}}&highlight_run={{key_run.id}}">{{ machine.name}} {%- set first_result_shown = false -%} {%- for day_result in day_results|reverse -%} Index: lnt/trunk/tests/server/ui/V4Pages.py =================================================================== --- lnt/trunk/tests/server/ui/V4Pages.py +++ lnt/trunk/tests/server/ui/V4Pages.py @@ -181,6 +181,13 @@ for row in table.findall("./tbody/tr")] +def get_table_links(table): + return [[link.get("href") + for cell in row.findall("./td") + for link in cell.findall("a")] + for row in table.findall("./tbody/tr")] + + def check_row_is_in_table(table, expected_row_content): body_content = get_table_body_content(table) assert expected_row_content in body_content, \ @@ -195,6 +202,13 @@ (expected_content, body_content) +def check_table_links(table, expected_content): + body_content = get_table_links(table) + assert expected_content == body_content, \ + "Expected table links %s, found %s" % \ + (expected_content, body_content) + + def check_body_result_table(client, url, fieldname, expected_content): table = get_results_table(client, url, fieldname) check_table_content(table, expected_content) @@ -435,6 +449,11 @@ ["", "machine2", "1.0000", "-", "900.00%", ""], ["test2", ""], ["", "machine2", "FAIL", "-", "PASS", ""]]) + check_table_links(result_table_20120504, + [[], + ["/db_default/v4/nts/graph?plot.0=2.4.3&highlight_run=6"], + [], + ["/db_default/v4/nts/graph?plot.0=2.5.3&highlight_run=6"]]) check_body_nr_tests_table( client, '/v4/nts/daily_report/2012/5/04', @@ -453,6 +472,15 @@ ["", "machine2", "1.0000", '-', '20.00%', ""], ["test_mhash_on_run", ""], ["", "machine2", "1.0000", '-', '20.00%', ""], ]) + check_table_links(result_table_20120513, + [[], + ['/db_default/v4/nts/graph?plot.0=2.6.3&highlight_run=9'], + [], + ['/db_default/v4/nts/graph?plot.0=2.7.3&highlight_run=9'], + [], + ['/db_default/v4/nts/graph?plot.0=2.8.3&highlight_run=9'], + [], + ['/db_default/v4/nts/graph?plot.0=2.9.3&highlight_run=9']]) sparkline_test6_xml = \ get_sparkline(result_table_20120513, "test6", "machine2")