キュウリ - 分度器タイプスクリプトロジックに基づいていくつかのテストスクリプトを実装していましたが、私のGherkinコード(キュウリの機能)手順で:WebStormの "定義されていないステップリファレンス"はタイプスクリプトのステップ定義コードを参照しようとしています
手順の定義は、活字体でコード化されました。しかし、私のテストはすべてコンパイルされて正常に実行されます。私のキュウリのコードがTypeScriptのコードを理解していないようです。 There is the same problem as mine, but it didn't solve my problem.
私は手動でステップ定義ファイルを作成しようとしています、typescriptファイルを作成するためのオプションはありません、JavaScriptのみ:
ここステップ定義typescriptですコードの私の例である:
は、defineSupportCode(({Given, When, Then, Before}) => {
let search: Search;
Before(() => {
search = new Search();
});
Given(/^User on the angular site$/, async() => {
let title = await browser.getTitle();
return expect(title).to.equal('Angular');
});
When(/^User type "(.*?)" into the search input field$/, async (text: string) => {
await search.enterSearchInput(text);
});
Then(/^User should see some results in the search overlay$/, async() => {
await search.getSearchResultItems();
let count = await search.getCountOfResults();
return expect(count).to.be.above(0);
});
});
そして、私のキュウリファイル:
Feature: Search
As a developer using Angular
User need to look-up classes and guidelines
So that User can concentrate on building awesome apps
@SearchScenario
Scenario: Type in a search-term
Given User on the angular site
When User type "foo" into the search input field
Then User should see some results in the search overlay
マイリポジトリ構造:
/features
/steps
searchSteps.ts
search.feature
/pages
search.ts
は、誰かがこの問題を解決する方法を知っていますか?