<commit_before>package org.jtalks.tests.jcommune.tests.pm;

import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
import utils.CollectionHelp;
import utils.StringHelp;

import static org.jtalks.tests.jcommune.assertion.Exsistence.assertionExistBySelector;
import static org.jtalks.tests.jcommune.common.JCommuneSeleniumTest.driver;
import static org.jtalks.tests.jcommune.common.JCommuneSeleniumTest.logOut;
import static org.jtalks.tests.jcommune.common.JCommuneSeleniumTest.pmPage;
import static org.jtalks.tests.jcommune.common.JCommuneSeleniumTest.signIn;

/**
 * @author masyan
 */
public class JC93PMSendMessageFromDraft {
	String title = StringHelp.getRandomString(10);
	String toUser;
	String message = StringHelp.getRandomString(10);

	@BeforeMethod(alwaysRun = true)
	@Parameters({"app-url", "uUsername", "uPassword", "uUsername2"})
	public void setupCase(String appUrl, String username, String password, String username2) {
		driver.get(appUrl);
		signIn(username, password);
		pmPage.getPmInboxLink().click();
		pmPage.getPmNewMessageLink().click();
		this.toUser = username2;
		pmPage.getToField().sendKeys(toUser);
		pmPage.getTitleField().sendKeys(title);
		pmPage.getMessageField().sendKeys(message);
		pmPage.getSaveButton().click();
	}

	@AfterMethod(alwaysRun = true)
	@Parameters({"app-url"})
	public void destroy(String appUrl) {
		logOut(appUrl);
	}

	@Test
	public void pmSendMessageFromDraftTest() {
		CollectionHelp.getFirstWebElementFromCollection(pmPage.getDraftMessageCheckboxes()).click();
		pmPage.getDraftMessageEditButton().click();
		pmPage.getSendButton().click();
		assertionExistBySelector(driver, pmPage.pmHeadingOutboxSel);
	}
}<commit_msg>jc93 excluded from test package because of bug<commit_after>package org.jtalks.tests.jcommune.tests.pm;

import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
import utils.CollectionHelp;
import utils.StringHelp;

import static org.jtalks.tests.jcommune.assertion.Exsistence.assertionExistBySelector;
import static org.jtalks.tests.jcommune.common.JCommuneSeleniumTest.*;

/**
 * @author masyan
 */
public class JC93PMSendMessageFromDraft {
    String title = StringHelp.getRandomString(10);
    String toUser;
    String message = StringHelp.getRandomString(10);

    @BeforeMethod(enabled = false)
    @Parameters({"app-url", "uUsername", "uPassword", "uUsername2"})
    public void setupCase(String appUrl, String username, String password, String username2) {
        driver.get(appUrl);
        signIn(username, password);
        pmPage.getPmInboxLink().click();
        pmPage.getPmNewMessageLink().click();
        this.toUser = username2;
        pmPage.getToField().sendKeys(toUser);
        pmPage.getTitleField().sendKeys(title);
        pmPage.getMessageField().sendKeys(message);
        pmPage.getSaveButton().click();
    }

    @AfterMethod(enabled = false)
    @Parameters({"app-url"})
    public void destroy(String appUrl) {
        logOut(appUrl);
    }

    @Test(enabled = false)
    public void pmSendMessageFromDraftTest() {
        CollectionHelp.getFirstWebElementFromCollection(pmPage.getDraftMessageCheckboxes()).click();
        pmPage.getDraftMessageEditButton().click();
        pmPage.getSendButton().click();
        assertionExistBySelector(driver, pmPage.pmHeadingOutboxSel);
    }
}
{'fraction_non_alphanumeric': 0.11906791702188121, 'fraction_numerical': 0.005683432793407218, 'mean_word_length': 5.230088495575221, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5837348', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1110, 'n_words': 171}