如何让黄瓜读取场景大纲示例值包含单引号
How to make cucumber read Scenario Outline Example values contain single quotes
......
And I will see the providerName <providerName> for Providerone
.......
Examples:
| providerName |
| 'St. Edward's School' |
以上场景大纲生成了以下测试存根。它描述了黄瓜考虑了单引号中的第一个值。如何在 cucmber 中声明示例语句,以便它将整个值读取为 1 string
When('I will see the providerName {string}s School\' for Providerone', function (string) {
// Write code here that turns the phrase above into concrete actions
return 'pending';
您需要在步骤中将提供者名称用引号引起来:
And I will see the providerName "<providerName>" for Providerone
那么示例 table 不需要任何多余的引号:
Examples:
| providerName |
| St. Edward's School |
......
And I will see the providerName <providerName> for Providerone
.......
Examples:
| providerName |
| 'St. Edward's School' |
以上场景大纲生成了以下测试存根。它描述了黄瓜考虑了单引号中的第一个值。如何在 cucmber 中声明示例语句,以便它将整个值读取为 1 string
When('I will see the providerName {string}s School\' for Providerone', function (string) {
// Write code here that turns the phrase above into concrete actions
return 'pending';
您需要在步骤中将提供者名称用引号引起来:
And I will see the providerName "<providerName>" for Providerone
那么示例 table 不需要任何多余的引号:
Examples:
| providerName |
| St. Edward's School |