diff --git a/src/features/previewModalWindow.feature b/src/features/previewModalWindow.feature index 82488c76..ca2d780f 100644 --- a/src/features/previewModalWindow.feature +++ b/src/features/previewModalWindow.feature @@ -5,13 +5,19 @@ Feature: Modal window with preview of output document Because I want to be sure that data processed corretly Background: - Given I open the url "https://dash-staging.accumatic.com/sign-out" - When I pause for 1000ms - Then I wait on element "form.dash-form" for 5000ms to be displayed - When I open the url "https://dash-staging.accumatic.com/sign-in" - When I set "beepbeep" to the inputfield "#dash-form-field-password" - When I set "aleksey.gerasimov@akvelon.com" to the inputfield "#dash-form-field-email" - And I press "Enter" + Given I authorized as Dealer + + @Verbose + Scenario: Able to switch page of items + Then I wait on element "div.job-item" for 2000ms to be displayed + When I click on the element "div.job-item" + Then I wait on element "a.preview-icon-wrapper" for 2000ms to be displayed + When I click on the element "a.preview-icon-wrapper" + Then I wait on element "div.header-block.header-block-right img.close-button" + When I click on the element "div.dealertrack-preview-table div.select" + And I click on the element "div.dealertrack-preview-table div.select div[class*='-menu'] div[class*='-option']" + When I click on the element "div.dealertrack-preview-table div.pagination-wrapper a:nth-child(4)" + Then I expect that element "div.dealertrack-preview-table div.table-wrapper table tbody tr:nth-child(2) td.cell.read-only span.value-viewer" matches the text "11" @Verbose Scenario: Able to close preview modal window diff --git a/src/support/action/authorizationOrSkip.ts b/src/support/action/authorizationOrSkip.ts index b0ef59c3..cf1748ab 100644 --- a/src/support/action/authorizationOrSkip.ts +++ b/src/support/action/authorizationOrSkip.ts @@ -7,6 +7,7 @@ export function authorizationOrSkip(role: 'Dealer' | 'Administrator'): void { browser.pause(1000); const currentUrl = browser.getUrl(); if (currentUrl.includes('jobs')) { + $('div.name')['waitForExist'](5000, false); return; }