当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript scenarioo-js.scenario函数代码示例

本文整理汇总了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();
            });
    });
开发者ID:,项目名称:,代码行数:58,代码来源:

示例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();
            });

    });
开发者ID:,项目名称:,代码行数:24,代码来源:


注:本文中的scenarioo-js.scenario函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。