mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2025-02-12 06:08:28 +00:00
[tests] avoid false positives in Frontend Weblinks Test
This commit is contained in:
parent
789f5ca534
commit
fde1d3618c
@ -70,6 +70,7 @@ class FrontendWeblinksCest
|
|||||||
$I->waitForText('Uncategorised','30', ['css' => 'h3']);
|
$I->waitForText('Uncategorised','30', ['css' => 'h3']);
|
||||||
$I->checkForPhpNoticesOrWarnings();
|
$I->checkForPhpNoticesOrWarnings();
|
||||||
$I->comment('I open the uncategorised Weblink Category');
|
$I->comment('I open the uncategorised Weblink Category');
|
||||||
|
$I->waitForElement(['link' => 'Uncategorised'], 60);
|
||||||
$I->click(['link' => 'Uncategorised']);
|
$I->click(['link' => 'Uncategorised']);
|
||||||
|
|
||||||
// Check that hits is 0
|
// Check that hits is 0
|
||||||
@ -81,7 +82,17 @@ class FrontendWeblinksCest
|
|||||||
|
|
||||||
// Click on the link, go back, and check that hits is still 0
|
// Click on the link, go back, and check that hits is still 0
|
||||||
$I->click(['link' => $title]);
|
$I->click(['link' => $title]);
|
||||||
$I->moveBack();
|
|
||||||
|
$I->amOnPage('index.php?option=com_weblinks');
|
||||||
|
$I->waitForElement(['link' => 'Uncategorised'], 60);
|
||||||
|
$I->click(['link' => 'Uncategorised']);
|
||||||
|
$I->comment('I search the weblink: ' . $title);
|
||||||
|
$I->waitForElement(['id' => 'filter-search'], 60);
|
||||||
|
$I->fillField(['id' => 'filter-search'], $title);
|
||||||
|
$I->pressKey(['id' => 'filter-search'], \Facebook\WebDriver\WebDriverKeys::ENTER);
|
||||||
|
$I->wait(1);
|
||||||
|
$I->waitForText('Uncategorised','30', ['css' => 'h2']);
|
||||||
|
|
||||||
$I->expectTo('see that hits is still 0');
|
$I->expectTo('see that hits is still 0');
|
||||||
$I->see('Hits: 0', ['class' => 'list-hits']);
|
$I->see('Hits: 0', ['class' => 'list-hits']);
|
||||||
}
|
}
|
||||||
@ -116,9 +127,15 @@ class FrontendWeblinksCest
|
|||||||
// Click on the link, go back, and check that hits is 1
|
// Click on the link, go back, and check that hits is 1
|
||||||
$I->click(['link' => $title]);
|
$I->click(['link' => $title]);
|
||||||
$I->amOnPage('index.php?option=com_weblinks');
|
$I->amOnPage('index.php?option=com_weblinks');
|
||||||
$I->waitForText('Uncategorised','30', ['css' => 'h3']);
|
|
||||||
$I->comment('I open the uncategorised Weblink Category');
|
$I->comment('I open the uncategorised Weblink Category');
|
||||||
|
$I->waitForElement(['link' => 'Uncategorised'], 60);
|
||||||
$I->click(['link' => 'Uncategorised']);
|
$I->click(['link' => 'Uncategorised']);
|
||||||
|
$I->comment('I search the weblink: ' . $title);
|
||||||
|
$I->waitForElement(['id' => 'filter-search'], 60);
|
||||||
|
$I->fillField(['id' => 'filter-search'], $title);
|
||||||
|
$I->pressKey(['id' => 'filter-search'], \Facebook\WebDriver\WebDriverKeys::ENTER);
|
||||||
|
$I->wait(1);
|
||||||
|
$I->waitForText('Uncategorised','30', ['css' => 'h2']);
|
||||||
$I->expectTo('see that hits is 1');
|
$I->expectTo('see that hits is 1');
|
||||||
$I->see('Hits: 1', ['class' => 'list-hits']);
|
$I->see('Hits: 1', ['class' => 'list-hits']);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user