I am testing electron application use these technologies, Spectron, Chai, chai as promised I want to write my test cases in separate file, except all in one file.
Here's what I've tried,
describe("Login", function () {
this.timeout(10000);
//Case 1: wait for Electron window to open
it('open window', function () {
return app.client.waitUntilWindowLoaded().getWindowCount().should.eventually.equal(1);
});
//Case 2: Initial Login - Empty username & Password
it("Click on Login Without any Data", function () {
//Wait for window to load
return app.client.waitUntilWindowLoaded()
.setValue(usernametxt, "")
.setValue(passwordtxt, "")
.click(submitbtn)
.getText('.notification-content')
.should.eventually.equal("Please fill both username and password");
});
});
Simply I want to write Case 1 and Case 2 into Seperate file, from Test initializing File.