Skip to content

Commit

Permalink
fix execution maxLogSize test
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaveva committed May 7, 2024
1 parent 118253f commit 0c32e34
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ class LogViewerOutputSpec extends SeleniumBase{
def projectHomePage = page HomePage
def jobShowPage = page JobShowPage
def executionShowPage = page ExecutionShowPage
executionShowPage.setLoadPath("/execution/show/1?maxLogSize=5000000")

when: "We run the job to have multiple lines in log output"
loginPage.go()
Expand All @@ -124,6 +123,8 @@ class LogViewerOutputSpec extends SeleniumBase{
jobShowPage.goToJob("1f0306cd-e123-44f3-8977-9e52edad8ce8")
jobShowPage.getRunJobBtn().click()
executionShowPage.validateStatus 'SUCCEEDED'
String executionId = executionShowPage.getCurrentExecutionId()
executionShowPage.setLoadPath("/project/${longOutPutProjectName}/execution/show/${executionId}?maxLogSize=5000000")
executionShowPage.go()
executionShowPage.getLink 'Log Output' click()
def showWarningMessage = jobShowPage.waitForElementVisible(By.xpath("//div[contains(@class, 'execution-log__line')]")).isDisplayed()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class ExecutionShowPage extends BasePage {
static final By logContentTextOverflowBy = By.cssSelector(".execution-log__content-text.execution-log__content-text--overflow")
static final By gutterLineNumberBy = By.cssSelector(".gutter.line-number")
By runAgainLink = By.linkText("Run Again")
By executionIdBy = By.cssSelector(".flex-item-1.text-right")

ExecutionShowPage(final SeleniumContext context) {
super(context)
Expand Down Expand Up @@ -252,4 +253,12 @@ class ExecutionShowPage extends BasePage {
def validateStatus(String status) {
waitForElementAttributeToChange executionStateDisplayLabel, 'data-execstate', status
}

/**
* Gets the execution id shown in the UI and removes the "*" from the element text
* @return String executionId
*/
String getCurrentExecutionId(){
(el executionIdBy).getText().replace("#", "")
}
}

0 comments on commit 0c32e34

Please sign in to comment.