當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。