diff --git a/tests/UI/specs/BarGraph_spec.js b/tests/UI/specs/BarGraph_spec.js
index 0acdd15662bab7b8727d086e194ce69b81ae4979..29bfbe73b252270fb842bf463dcbe43bf814000c 100644
--- a/tests/UI/specs/BarGraph_spec.js
+++ b/tests/UI/specs/BarGraph_spec.js
@@ -10,8 +10,16 @@
 describe("BarGraph", function () {
     this.timeout(0);
 
-    var url = "?module=Widgetize&action=iframe&moduleToWidgetize=Referrers&idSite=1&period=year&date=2012-08-09&"
-            + "actionToWidgetize=getKeywords&viewDataTable=graphVerticalBar&isFooterExpandedInDashboard=1";
+    var tokenAuth = "9ad1de7f8b329ab919d854c556f860c1", // md5('superUserLogin' . md5('superUserPass'))
+        url = "?module=Widgetize&action=iframe&moduleToWidgetize=Referrers&idSite=1&period=year&date=2012-08-09&"
+            + "actionToWidgetize=getKeywords&viewDataTable=graphVerticalBar&isFooterExpandedInDashboard=1&"
+            + "token_auth=" + tokenAuth;
+
+    before(function () {
+        // use real auth + token auth to test that auth works when widgetizing reports in an iframe
+        testEnvironment.testUseMockAuth = 0;
+        testEnvironment.save();
+    });
 
     it("should load correctly", function (done) {
         expect.screenshot("load").to.be.capture(function (page) {