15 import(
'lib.pkp.tests.WebTestCase');
17 use Facebook\WebDriver\WebDriverBy;
18 use Facebook\WebDriver\Interactions\WebDriverActions;
19 use Facebook\WebDriver\WebDriverExpectedCondition;
26 return PKP_TEST_ENTIRE_DB;
33 $this->open(self::$baseUrl);
35 $this->logIn(
'admin',
'admin');
36 $actions =
new WebDriverActions(self::$driver);
37 $actions->moveToElement($this->waitForElementPresent(
'//ul[@id="navigationPrimary"]//a[text()="Tools"]'))
38 ->click($this->waitForElementPresent(
'//ul[@id="navigationPrimary"]//a[text()="Import/Export"]'))
40 $this->click($selector=
'link=QuickSubmit Plugin');
41 $this->waitForElementPresent(
'css=[id=sectionId]');
42 $this->select(
'id=sectionId',
'label=' . $this->escapeJS(
'Articles'));
45 $this->waitForElementPresent($selector=
'css=[id^=title-]');
46 $this->type($selector,
'QuickSubmit Test Submission');
47 $this->typeTinyMCE(
'abstract',
'This is a QuickSubmit test submission.');
50 $this->click(
'css=[id^=component-grid-users-author-authorgrid-addAuthor-button-]');
51 $this->waitForElementPresent($selector=
'css=[id^=givenName-]');
52 $this->type($selector,
'Quincy');
53 $this->type(
'css=[id^=familyName-]',
'Submitter');
54 $this->select(
'id=country',
'label=Canada');
55 $this->type(
'css=[id^=email-]',
'qsubmitter@mailinator.com');
56 $this->type(
'css=[id^=affiliation-]',
'Queens University');
57 $this->click(
'//label[contains(.,\'Author\')]');
58 $this->click(
'//form[@id=\'editAuthor\']//button[text()=\'Save\']');
59 $this->waitForElementPresent(
'//div[contains(text(), \'Author added.\')]');
62 $this->click(
'//form[@id=\'quickSubmitForm\']//button[text()=\'Save\']');
63 $this->waitForElementPresent(
'link=Go to Submission');