vendredi 23 septembre 2016

Functional test return max-width of an element, gives unexpected result

I have a div with a class of "content-wrapper" this content-wrapper has a max-width of 100%. Im trying to prove this through a functional test.

So at the moment I am doing the following.

it('should have 100% max-width on content-wrapper', function() {
    return basePage.contentWrapper().cssProperty('max-width')
    .then(function(result) {
        return expect(result.value).to.equal('100%');
    });
});

The following code returns a result of 1280px which is the size of the browser where im running my tests. 1280px is set nowhere in the code and if i try to do $('.content-wrapper').css('max-width') in the console it returns me '100%', so max-width is definitely set to 100%.

Does anybody know how to fix this?

Aucun commentaire:

Enregistrer un commentaire