diff options
Diffstat (limited to 'src/ng/directive/ngStyle.js')
| -rw-r--r-- | src/ng/directive/ngStyle.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ng/directive/ngStyle.js b/src/ng/directive/ngStyle.js index b9fbe216..05dcfab1 100644 --- a/src/ng/directive/ngStyle.js +++ b/src/ng/directive/ngStyle.js @@ -27,13 +27,15 @@ color: black; } </file> - <file name="scenario.js"> + <file name="protractorTest.js"> + var colorSpan = element(by.css('.doc-example-live span')); + it('should check ng-style', function() { - expect(element('.doc-example-live span').css('color')).toBe('rgb(0, 0, 0)'); - element('.doc-example-live :button[value=set]').click(); - expect(element('.doc-example-live span').css('color')).toBe('rgb(255, 0, 0)'); - element('.doc-example-live :button[value=clear]').click(); - expect(element('.doc-example-live span').css('color')).toBe('rgb(0, 0, 0)'); + expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)'); + element(by.css('.doc-example-live input[value=set]')).click(); + expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)'); + element(by.css('.doc-example-live input[value=clear]')).click(); + expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)'); }); </file> </example> |
