我有一个像这样的黄瓜功能:
@MainSuite
Scenario: Verify that user can login
Given I can see the login form
Then I set a username
And I set a password
And I click in Login button
Then I see the "wrong-password" message
我需要检查用户是否可以登录 5 个不同的页面。我需要在 5 个不同的地方运行该功能。就像,我需要在 /login.html、/old_login.html、/after_restore_password.html 等中运行该功能(这只是一个示例)。
你知道怎么做吗?
目前,我只有一个硬编码文件。显然我需要改变它。
this.Given(/^I can see the login form$/, function(done) {
this.goTo('login.html');
browser.wait(EC.visibilityOf(this.loginFormContainer));
done();
});