package com.atlassian.webdriver.bitbucket.element;

import com.atlassian.pageobjects.elements.WebDriverLocatable;
import com.atlassian.pageobjects.elements.timeout.TimeoutType;
import com.atlassian.webdriver.integration.jira.element.JiraIssuesDialog;
import org.openqa.selenium.By;

public class CommentWithJiraLinks extends Comment {

    public CommentWithJiraLinks(By locator) {
        super(locator);
    }

    public CommentWithJiraLinks(By locator, TimeoutType timeoutType) {
        super(locator, timeoutType);
    }

    public CommentWithJiraLinks(WebDriverLocatable locatable,
                                TimeoutType timeoutType) {
        super(locatable, timeoutType);
    }

    public CommentWithJiraLinks(By locator, WebDriverLocatable parent,
                                TimeoutType timeoutType) {
        super(locator, parent, timeoutType);
    }

    public CommentWithJiraLinks(By locator, WebDriverLocatable parent) {
        super(locator, parent);
    }

    public JiraIssuesDialog openIssueDialog(String issueToClickOn) {
        find(By.linkText(issueToClickOn)).click();
        return pageBinder.bind(JiraIssuesDialog.class, By.id("markup-jira-issues-dialog"));
    }


}
