sorry forgot an 's' in shippingcosts

Am Freitag, 28. August 2015 15:23:05 UTC+2 schrieb Jens Hoffmann:
>
> Hello, 
>
>
> *I am trying to write a protractor test which check for the existence of an 
> table element. *
>
> *If the element doesn't exist in the table, the test should be successful.*
>
> *But the promise never resolves. I hope you can help me out. *
>
>
> *HTML:*
>
>
> *<table>
>     ...
>     <tr ng-hide="vm.noShippingCosts">
>         <td>shippingcosts</td>
>     </tr>
>     ...
> </table>*
>
>
>
> Page Object: 
>
> FreeShippingPO.prototype = Object.create({}, {
>     myelement: {
>         get: function () {
>             function getShippingCosts() {
>                 var deferred = protractor.promise.defer();
>
>                 element.all(by.css('table tr')).each(function (element, 
> index) {
>                     if(element.getText() === 'shippingcosts') {
>                         deferred.resolve(true);
>                     }
>                 });
>                 return deferred.promise;
>             }
>             return getShippingCosts();
>         }
>     }
> });
>
>
> describe('free shipping costs', function () {
>     it('should not have table cell with "shipping costs"', function () {
>         browser.get('http://localhost:7777/#/shoppingCart#12314313121231');
>         expect(po.myelement).to.be.false;
>     });
> });
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to