本文整理匯總了TypeScript中scenarioo-js.useCase函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript useCase函數的具體用法?TypeScript useCase怎麽用?TypeScript useCase使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了useCase函數的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: useCase
'use strict';
import { scenario, step, useCase } from 'scenarioo-js';
import * as Utils from '../util';
import BranchAliasesPage from '../pages/branchAliasesPage';
const NUMBER_OF_ALIASES_IN_CONFIG = 2;
const FIRST_TEST_ALIAS_INDEX = NUMBER_OF_ALIASES_IN_CONFIG;
useCase('Manage branch aliases')
.description('Define new branch aliases, edit existing ones and delete them.')
.describe(() => {
beforeEach(async () => {
await Utils.startScenariooRevisited();
});
scenario('Add and remove')
.description('Branch aliases can be added and removed')
.it(async () => {
await BranchAliasesPage.goToPage();
await step('display the manage branch aliases page');
await BranchAliasesPage.assertNumberOfAliases(NUMBER_OF_ALIASES_IN_CONFIG);
await BranchAliasesPage.enterAlias('Test Alias 1', 'wikipedia-docu-example', 'my description 1');
await BranchAliasesPage.enterAlias('Test Alias 2', 'wikipedia-docu-example', 'my description 2');
await BranchAliasesPage.saveAndAssertSuccessMessage();
await step('saved build aliases');
await BranchAliasesPage.reset();
await BranchAliasesPage.assertNumberOfAliases(NUMBER_OF_ALIASES_IN_CONFIG + 2);