Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1165)

Unified Diff: dashboard/dashboard/elements/chart-container-test.html

Issue 3013743002: Dashboard - Populate bug_id with uri parameter if available. (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dashboard/dashboard/elements/chart-container.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/elements/chart-container-test.html
diff --git a/dashboard/dashboard/elements/chart-container-test.html b/dashboard/dashboard/elements/chart-container-test.html
index 8c4c8387ec590a0dc3fea28bebb06fee34642bf3..bfc68bb416b3f6a141a871a0ccfd229d48e7368d 100644
--- a/dashboard/dashboard/elements/chart-container-test.html
+++ b/dashboard/dashboard/elements/chart-container-test.html
@@ -105,6 +105,33 @@ tr.b.unittest.testSuite(function() {
'http___dromaeo.com?dom-attr');
}, testOptions);
+ let originalUriGetQueryString;
+ const testOptionsUri = {
+ setUp() {
+ originalUriGetQueryString = uri.getQueryString;
+ },
+ tearDown() {
+ testing_common.clearXhrMock();
+ testing_common.clearFixture();
+ uri.getQueryString = originalUriGetQueryString;
+ }
+ };
+
+ test('showTooltip uses uri bug_id', function() {
+ uri.getQueryString = function() { return '?bug_id=123'; };
+
+ testing_common.mockChartJson(
+ dromaeoCharts, dromaeoCharts.graphSelectedJson);
+ testing_common.mockChartJson(
+ sunspiderCharts, sunspiderCharts.graphSelectedJson);
+ const chart = createChart();
+ this.addHTMLOutput(chart);
+ chart.addSeriesGroup(dromaeoCharts.graphParams);
+ chart.addSeriesGroup(sunspiderCharts.graphParams);
+ chart.showTooltip(0, 0);
+ assert.strictEqual(chart.$.tooltip.bugId, '123');
+ }, testOptionsUri);
+
test('populateTestPicker', function() {
testing_common.mockChartJson(dromaeoCharts);
const chart = createChart();
« no previous file with comments | « dashboard/dashboard/elements/chart-container.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698