I'm working with WebDriverIO and Mocha for my initial UI tests.
conf
is an object where the WebDriverIO scripts live and (in this case) the test returns an object... { width : ###, active : '' }
When I run the test, I get to through the first test as expected but the browser closes before the other two tests can run (and providing the failing tests).
So...
"View Select Resizes to Mobile" = Pass
[Browsers close]
"View Select Resizes to Tablet" = Fail
"View Select Resizes to Desktop" = Fail
Why are the browser sessions closing? (I would like to keep the same session open for all three)
Is there a way to remedy this or a specific place in my project I should look?
describe('View Select Resizes to', function(){
before(function(){
browser.url( 'http://localhost:8000/' );
});
it('Mobile', async()=>{
let result = {};
result = await conf.viewselect('mobile');
assert( result.width, 375 );
assert( result.active, 'mobile' );
});
it('Tablet', async()=>{
let result = {};
result = await conf.viewselect('mobile');
assert( result.width, 540 );
assert( result.active, 'tablet' );
});
it('Desktop', async()=>{
let result = {};
result = await conf.viewselect('desktop');
assert( result.width, 1067 );
assert( result.active, 'desktop' );
});
});
Thanks for the help :)