Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testdeck: fix execution maxLogSize test #9113

Merged
merged 2 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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("#", "")
}
}