From 7aef2d54e0a48fae18a289813f699962d8310565 Mon Sep 17 00:00:00 2001 From: Julie Date: Sat, 11 Jan 2014 16:59:15 -0800 Subject: test(docs): convert example end to end doc tests from scenario runner to protractor Thanks to jeffbcross, petebacondarwin, btford, jdeboer, tbosch for contributions! Closes #6023 --- src/ng/sce.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/ng/sce.js') diff --git a/src/ng/sce.js b/src/ng/sce.js index 321921f5..a7d616a5 100644 --- a/src/ng/sce.js +++ b/src/ng/sce.js @@ -624,13 +624,15 @@ function $SceDelegateProvider() { ] - + describe('SCE doc demo', function() { it('should sanitize untrusted values', function() { - expect(element('.htmlComment').html()).toBe('Is anyone reading this?'); + expect(element(by.css('.htmlComment')).getInnerHtml()) + .toBe('Is anyone reading this?'); }); + it('should NOT sanitize explicitly trusted values', function() { - expect(element('#explicitlyTrustedHtml').html()).toBe( + expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe( 'Hover over this text.'); }); -- cgit v1.2.3