Adds a data tag to pipeline-big-label, which allows easier passing of stage names with spaces (#1737)

This commit is contained in:
Karl Shultz 2018-05-21 18:30:21 -04:00 committed by GitHub
parent 9cc835242d
commit e2b0124209
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -66,8 +66,7 @@ public class EditorPage {
*/
public void deleteStage(String stageName) {
logger.info("Deleting stage " + stageName);
// Click the name of the stage
wait.click(By.id("pipeline-big-label-" + stageName));
wait.click(By.xpath("//*[@data-stagename=\"" + stageName + "\"]"));
// Click the little popup button
wait.click(By.cssSelector("div.more-menu"));
// Click Delete

View File

@ -402,8 +402,7 @@ export class EditorPipelineGraph extends Component<DefaultProps, Props, State> {
}
}
return (
// The id is in here to facilitate easier test automation.
<div className={classNames.join(' ')} id={`pipeline-big-label-${details.text ? `${details.text}` : ""}`} style={style} key={key} onClick={e => this.nodeClicked({ isPlaceholder: false, stage }, e)}>
<div className={classNames.join(' ')} data-stagename={`${details.text ? `${details.text}` : ""}`} style={style} key={key} onClick={e => this.nodeClicked({ isPlaceholder: false, stage }, e)}>
{details.text || NBSP}
{inner}
</div>