Given('I login as/with {string}', function(username) {
console.log('I login as %s', username);
});
现在是否运行这些步骤:
Given I login as "user" // I login as user Given I login with "user_1" // I login as user_1
将两者都考虑在内,输出将是:我以用户身份登录
我以用户_1身份登录
有关黄瓜表达的更多信息,请参见Alternative steps。>>