1

私は電子アプリケーションをテストしていますこれらのテクノロジ、Spectron、Chai、chai を使用して、テストケースを別のファイルに書きたいと約束しましたが、すべてを 1 つのファイルにまとめました。

これが私が試したことです、

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");
    });

});

単に、テスト初期化ファイルから、ケース 1 とケース 2 を別のファイルに書きたいだけです。

4

1 に答える 1