Пример #1
0
    .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
0
    .describe(() => {

        beforeEach(async () => {
            await Utils.startScenariooRevisited();
        });

        scenario('Screen without annotations')
            .description('No screen annotations are shown if the step does not contain any annotations')
            .it(async () => {
                await Utils.navigateToRoute('/step/Find Page/find_multiple_results/startSearch.jsp/0/0');
                await StepPage.assertScreenshotIsShown();
                await StepPage.assertNoScreenAnnotationsArePresent();
                await step('No screen annotations are shown');
            });

        scenario('Screen with annotations')
            .description('Screen annotations are shown if the step has some')
            .it(async () => {
                await Utils.navigateToRoute('/step/Find Page/find_multiple_results/startSearch.jsp/0/1');
                await StepPage.assertScreenshotIsShown();
                await StepPage.assertNumberOfVisibleScreenAnnotationsIs(2);
                await step('Two screen annotations are shown');
            });

        scenario('Show and hide annotations')
            .description('Screen annotations can be hidden by clicking a button')
            .it(async () => {
                await Utils.navigateToRoute('/step/Find Page/find_multiple_results/startSearch.jsp/0/1');
                await StepPage.assertScreenshotIsShown();
                await StepPage.assertNumberOfVisibleScreenAnnotationsIs(2);
                await step('Two screen annotations are shown');

                await StepPage.clickShowScreenAnnotationsButton();
                await StepPage.assertNoScreenAnnotationsAreVisible();
                await step('Screen annotations are hidden');

                await StepPage.clickShowScreenAnnotationsButton();
                await StepPage.assertNumberOfVisibleScreenAnnotationsIs(2);
                await step('Two screen annotations are shown');
            });

        scenario('Popup')
            .description('Further information about the annotation is displayed in a popup')
            .it(async () => {
                await Utils.navigateToRoute('/step/Technical%20Corner%20Cases/dummy_scenario_with_screen_annotations_of_all_types_on_one_page/specialPageWithOnlyOneVariant.jsp/0/1');
                await StepPage.assertScreenshotIsShown();
                await StepPage.assertNumberOfVisibleScreenAnnotationsIs(11);
                await step('Eleven screen annotations are shown');

                await StepPage.clickFirstScreenAnnotation();
                await StepPage.assertScreenAnnotationPopupIsDisplayed();
                await StepPage.assertTitleOfAnnotationPopupIs('  DEFAULT-Annotation \'Life Is Beautiful\'');
                await step('Popup is shown');
            });

    });
Пример #3
0
    .describe(() => {

        beforeEach(async () => {
            await Utils.startScenariooRevisited();
        });

        scenario('Configuration and status')
            .description('The admin page shows the configured elaasticsearch endpoint and whether it\'s reachable.')
            .it(async () => {
                await GeneralSettingsPage.goToPage();
                await GeneralSettingsPage.assertSearchEndpointConfiguredAndReachable();
                await step('Search endpoint is configured and reachable');
            });

        scenario('Search with result')
            .description('Search for a term that yields some results.')
            .it(async () => {
                await HomePage.goToPage();
                await NavigationPage.enterSearchTerm('donate.jsp');
                await step('Search term entered');

                await NavigationPage.clickSearchButton();
                await BreadcrumbsPage.assertBreadcrumbElementText('breadcrumb_0', 'Home');
                await BreadcrumbsPage.assertBreadcrumbElementText('breadcrumb_last_1', 'Search Results for donate');
                await SearchResultsPage.assertResultTableTitle('Search Results (showing 1 of 1 hits)');
                await SearchResultsPage.assertNumberOfResultRows(3);
                await step('Search results');

                await SearchResultsPage.openFirstScenarioAndClickStep();
                await Utils.assertRoute('/step/Donate/find_donate_page/donate.jsp/0/0');
                await StepPage.assertScreenshotIsShown();
                await step('After navigating to a search result step');
            });

        scenario('Search with and without HTML source')
            .description('By default the HTML source is not searched, but the user can select to also search it.')
            .it(async () => {
                await HomePage.goToPage();
                await NavigationPage.enterSearchTerm('body');
                await step('Search term body entered, which mainly appears in the html source code');

                await NavigationPage.clickSearchButton();
                await BreadcrumbsPage.assertBreadcrumbElementText('breadcrumb_0', 'Home');
                await BreadcrumbsPage.assertBreadcrumbElementText('breadcrumb_last_1', 'Search Results for body');
                await SearchResultsPage.assertNoResultsShown();
                await step('No results, as not searching in html source');

                await SearchResultsPage.clickIncludeHtml();
                await BreadcrumbsPage.assertBreadcrumbElementText('breadcrumb_0', 'Home');
                await BreadcrumbsPage.assertBreadcrumbElementText('breadcrumb_last_1', 'Search Results for body');
                await SearchResultsPage.assertResultTableTitle('Search Results (showing 32 of 32 hits)');
                await SearchResultsPage.assertNumberOfResultRows(43);
                await step('Many results, as now searching in html source as well');
            });
    });
Пример #4
0
    .describe(() => {

        beforeEach(async () => {
            await Utils.startScenariooRevisited();
        });

        scenario('Create, edit and delete label configurations')
            .it(async () => {
                await LabelConfigurationsPage.navigateToPage();
                await step('show label configurations');

                await LabelConfigurationsPage.assertNumConfigurations(0);

                await LabelConfigurationsPage.addLabelConfiguration('corner-case', 5);
                await step('add label configuration');

                await HomePage.goToPage();
                await step('navigate away from the label config page to some other page');

                await LabelConfigurationsPage.navigateToPage();
                await LabelConfigurationsPage.assertNumConfigurations(1);
                await step('go back to label config page, label is still there');

                await LabelConfigurationsPage.updateLabelConfiguration(0, 'updated', 4);
                await step('update label configuration');

                await LabelConfigurationsPage.deleteLabelConfiguration(0);

                await LabelConfigurationsPage.navigateToPage();
                await LabelConfigurationsPage.assertNumConfigurations(0);
            });

    });
Пример #5
0
    .describe(() => {

        beforeEach(async () => {
            await Utils.startScenariooRevisited();
        });

        scenario('Select branch by alias')
            .description('Create an alias and assert browsing through steps works')
            .it(async () => {
                await BranchAliasesPage.goToPage();
                await BranchAliasesPage.enterAlias('Latest dev', 'wikipedia-docu-example', 'alias to latest development release');
                await BranchAliasesPage.save();
                await step('Create new branch alias');

                await NavigationPage.chooseBranch('Latest dev');
                await step('choose branch alias');

                await HomePage.goToPage();
                await HomePage.selectUseCase(1);
                await UsecasePage.selectScenario(0);
                await ScenarioPage.openStepByName('Step 1: Wikipedia Suche');
                await StepPage.assertPreviousStepIsDisabled();
                await step('browse step using branch alias');

                // Restore initial state for other tests
                await BranchAliasesPage.goToPage();
                await BranchAliasesPage.deleteAlias(FIRST_TEST_ALIAS_INDEX);
                await BranchAliasesPage.save();
                await NavigationPage.chooseBranch(BRANCH_WIKI);
            });

    });
Пример #6
0
    .describe(() => {

        beforeEach(async () => {
            await Utils.startScenariooRevisited();
        });

        scenario('Navigate upwards')
            .description('Navigate to the Home Page, filter for one use case, select scenario, click on breadcrumb')
            .it(async () => {
                await HomePage.goToPage();
                await step('Display the homePage');

                await HomePage.assertPageIsDisplayed();
                await HomePage.filterUseCases('User wants');
                await step('Enter filter criteria in use case overview');

                await HomePage.assertUseCasesShown(1);
                await step('One use case found');

                await HomePage.selectUseCase(0);
                await step('Selected found use case');

                await UsecasePage.selectScenario(3);
                await step('Selected scenario');

                await BreadcrumbsPage.assertBreadcrumbElementText('breadcrumb_1', 'Find Page');
                await BreadcrumbsPage.clickOnBreadcrumb('breadcrumb_1');
                await step('Clicked on use case in breadcrumb');

                await BreadcrumbsPage.clickOnBreadcrumb('breadcrumb_0');
                await step('Clicked on home breadcrumb');
            });

        scenario('Tooltip in breadcrumbs')
            .description('Navigate to scenario and test for tooltip')
            .it(async () => {
                await Utils.navigateToRoute('/step/Find%20Page/find_page_with_text_on_page_from_multiple_results/searchResults.jsp/0/0');
                await step('Display steps and pages');

                await BreadcrumbsPage.assertThatTooltipIsShown('tooltip_2', 'Scenario: Find page with ' +
                    'text on page from multiple results');
                await step('Test that tooltip explicit exists');
            });

    });
Пример #7
0
    .describe(() => {

        beforeEach(async () => {
            await Utils.startScenariooRevisited();
        });

        scenario('Browse variants')
            .description('Navigate to previous / next page variants.')
            .it(async () => {
                await Utils.navigateToRoute('/step/Switch%20Language/search_article_in_german_and_switch_to_spanish/contentPage.jsp/0/0');
                await StepPage.assertPageVariantIndicatorValue('Page-Variant 8 of 10');
                await step('A step of the contentPage.jsp page.');

                await StepPage.goToPreviousPageVariant();
                await StepPage.assertPageVariantIndicatorValue('Page-Variant 7 of 10');
                await step('A different page variant.');

                await StepPage.goToNextPageVariant();
                await StepPage.goToNextPageVariant();
                await StepPage.goToNextPageVariant();
                await StepPage.assertPageVariantIndicatorValue('Page-Variant 10 of 10');
                await StepPage.assertNextPageVariantButtonIsDisabled();
                await step('The last page variant. Button for next page variant is disabled.');
            });

        scenario('Variant Overview')
            .description('Go to page variants overview page to select a different page variant.')
            .it(async () => {
                await Utils.navigateToRoute('/step/Switch%20Language/search_article_in_german_and_switch_to_spanish/contentPage.jsp/0/0');
                await step('A step of the contentPage.jsp page.');

                await StepPage.clickAllPageVariantsLink();
                await Utils.assertRoute('/object/page/contentPage.jsp');
                await step('Overview of page variants in all use cases.');

                await ObjectDetailsPage.clickToExpand(3);
                await step('Expanded scenario with the steps that contain the page.');

                await ObjectDetailsPage.clickNthTreeTableRow(6);
                await Utils.assertRoute('/step/Find%20Page/find_page_title_ambiguous_directly/contentPage.jsp/0/2');
                await step('A different page variant.');
            });

    });
Пример #8
0
    .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();
            });

    });
Пример #9
0
    .describe(() => {

        beforeEach(async () => {
            await Utils.startScenariooRevisited();
        });

        scenario('Display and filter pages')
            .it(async () => {
                await HomePage.goToPage();
                await step('display the homePage');
                await HomePage.selectPagesTab();
                await HomePage.assertPagesTabContainsPage('startSearch.jsp');
                await step('select the custom tab for pages');
                await HomePage.filterPages('startSearch');
                await HomePage.assertCustomTabEntriesShown(1);
                await step('filter by name of the page');
            });

    });
Пример #10
0
    .describe(() => {

        beforeEach(async () => {
            await Utils.startScenariooRevisited();
        });

        scenario('ScenarioPage with comparisons')
            .description('Displaying diff info icons.')
            .labels(['diff-viewer'])
            .it(async () => {
                await Utils.navigateToRoute('/scenario/Donate/find_donate_page?branch=wikipedia-docu-example&build=2014-03-19');
                await NavigationPage.chooseComparison('To Projectstart');
                await ScenarioPage.expandAllPages();
                await ScenarioPage.assertFirstChangedPageDiffIconHasValue();
                await ScenarioPage.assertFirstChangedStepDiffIconHasValue();
                await ScenarioPage.assertAddedStepDiffIconTextEqualsAdded();
                await ScenarioPage.assertRemovedStepDiffIconTextEqualsRemoved();
                await ScenarioPage.assertAddedPageDiffIconTextEqualsAdded();
                await ScenarioPage.assertRemovedPageDiffIconTextEqualsRemoved();
                await step('Display one scenario');
                await NavigationPage.disableComparison();
            });
    });