本文整理匯總了TypeScript中scenarioo-js.scenario函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript scenario函數的具體用法?TypeScript scenario怎麽用?TypeScript scenario使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了scenario函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: beforeEach
.describe(() => {
beforeEach(async () => {
await Utils.startScenariooRevisited();
});
scenario('Display and filter usecases')
.it(async () => {
await HomePage.goToPage();
await HomePage.assertUseCasesShown(NUMBER_OF_USE_CASES);
await step('display usecases on homepage');
await HomePage.assertPageIsDisplayed();
await HomePage.filterUseCases('notinlist');
await HomePage.assertUseCasesShown(0);
await step('filter applied: no use cases shown');
await HomePage.filterUseCases('find page');
await HomePage.assertUseCasesShown(1);
await step('filter applied: one use case found');
await HomePage.filterUseCases('user wants find page');
await HomePage.assertUseCasesShown(1);
await step('other filter applied: one use case found');
});
scenario('Show and hide metadata')
.it(async () => {
await HomePage.goToPage();
await step('display the homePage, metadata shown');
await HomePage.assertPageIsDisplayed();
await HomePage.assertMetaDataShown();
await HomePage.hideMetaData();
await HomePage.assertMetaDataHidden();
await step('metadata hidden');
await HomePage.showMetaData();
await HomePage.assertMetaDataShown();
await step('metadata shown');
});
scenario('Display Diff-Information')
.labels(['diff-viewer'])
.it(async () => {
await HomePage.goToPage();
await step('display usecases on homepage');
await NavigationPage.chooseComparison(COMPARISON_PROJECTSTART);
await HomePage.assertPageIsDisplayed();
await step('To Projectstart comparison selected');
await HomePage.assertNumberOfDiffInfos(NUMBER_OF_USE_CASES);
await HomePage.sortByChanges();
await HomePage.assertLastUseCase(USE_CASE_WITH_HIGHEST_DIFF);
await step('Diff Infos sorted ascending');
await HomePage.sortByChanges();
await HomePage.assertFirstUseCase(USE_CASE_WITH_HIGHEST_DIFF);
await step('Diff Infos sorted descending');
return NavigationPage.disableComparison();
});
});
示例2: scenario
.describe(() => {
scenario('First visit')
.description('About dialog open on first access to Scenarioo to welcome new user.')
.it(async () => {
await Utils.startScenariooFirstTimeVisit();
await step('About dialog is displayed on first access of Scenarioo');
await HomePage.assertPageIsDisplayed();
await HomePage.assertScenariooInfoDialogShown();
await HomePage.closeScenariooInfoDialogIfOpen();
await HomePage.assertScenariooInfoDialogNotShown();
await step('About dialog is closed');
});
scenario('Later visits')
.description('About dialog not open when previously visited.')
.it(async () => {
await Utils.startScenariooRevisited();
await step('About dialog not visible for previous visitors');
await HomePage.assertPageIsDisplayed();
await HomePage.assertScenariooInfoDialogNotShown();
});
});