Skip to content
Snippets Groups Projects
Verified Commit a74a7574 authored by Alexandre Dias's avatar Alexandre Dias
Browse files

ISAICP-8376: Revert assertNotLinkOptionalRegion.

parent ef9b6c6c
No related branches found
No related tags found
2 merge requests!197Release 2.0.2,!196Release 2.0.1
......@@ -68,7 +68,7 @@ Feature: Contact Information moderation
# information entity.
When I am logged in as an "authenticated user"
And I go to the "Ceolwulf II of Mercia" contact information page
Then I should not see the link "Edit" in the optional "Entity actions" region
Then I should not see the link "Edit" in the "Entity actions" region
# The original author is allowed to update the entity with the requested
# changes.
......
......@@ -37,15 +37,15 @@ Feature: Asset distribution editing.
When I am logged in as a facilitator of the "Solution B" solution
And I go to the homepage of the "Asset distribution example" distribution
Then I should not see the link "Edit" in the optional "Entity actions" region
Then I should not see the link "Edit" in the "Entity actions" region
When I am logged in as an "authenticated user"
And I go to the homepage of the "Asset distribution example" distribution
Then I should not see the link "Edit" in the optional "Entity actions" region
Then I should not see the link "Edit" in the "Entity actions" region
When I am an anonymous user
And I go to the homepage of the "Asset distribution example" distribution
Then I should not see the link "Edit" in the optional "Entity actions" region
Then I should not see the link "Edit" in the "Entity actions" region
And I should see the text "Published on: 19/11/2019"
And I should see the text "Last update: 19/11/2021"
......
......@@ -24,10 +24,10 @@ Feature: "Edit" visibility options.
When I am logged in as an "authenticated user"
And I go to the homepage of the "My awesome solution abc v1" release
Then I should not see the link "Edit" in the optional "Entity actions" region
Then I should not see the link "Edit" in the "Entity actions" region
When I am an anonymous user
And I go to the homepage of the "My awesome solution abc v1" release
Then I should not see the link "Edit" in the optional "Entity actions" region
Then I should not see the link "Edit" in the "Entity actions" region
And I should see the text "Published on: 19/11/2020"
And I should see the text "Last update: 19/11/2022"
......@@ -65,7 +65,7 @@ Feature: Owner moderation
# Another authenticated user should not be allowed to edit the owner entity.
When I am logged in as an "authenticated user"
And I go to the homepage of the "EU healthy group" owner
Then I should not see the link "Edit" in the optional "Entity actions" region
Then I should not see the link "Edit" in the "Entity actions" region
# The original owner creator is allowed to update the entity with the
# requested changes.
......
......@@ -1036,30 +1036,6 @@ public function assertRegionNotPresent(string $region): void {
}
}
/**
* Asserts that no link is present in the given region.
*
* @todo ISAICP-8376 Revert this once all entity types have been mapped.
*
* Same as MinkContext::assertNotLinkRegion but does not fail if region is
* not found.
*
* @Then I should not see the link :link in the optional :region( region)
*
* @throws \Exception
* If the region is present but the link within it cannot be found.
*/
public function assertNotLinkOptionalRegion($link, $region): void {
$session = $this->getSession();
$regionObj = $session->getPage()->find('region', $region);
if ($regionObj) {
$result = $regionObj->findLink($link);
if (!empty($result)) {
throw new \Exception(sprintf('Link to "%s" in the "%s" region on the page %s', $link, $region, $this->getSession()->getCurrentUrl()));
}
}
}
/**
* Asserts that the page title tag equals to some text.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment