Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2251 from ec-europa/ISAICP-5677
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiu-cristea authored Oct 1, 2020
2 parents d48af43 + 0b1f266 commit 78ee1d9
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ content:
settings:
hosted_files_title: Download
remote_files_title: External
show_remote_files: false
show_remote_files: true
third_party_settings:
template_suggestion:
template_suggestion: no_wrappers
Expand Down
6 changes: 5 additions & 1 deletion tests/features/asset_distribution/track_download.feature
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ Feature: Asset distribution editing.
| Marianne Sherburne | marianne.herburne@example.com | OpenBSD images |
| Anonymous (not verified) | trackme@example.com | OpenBSD images |

# Sub test to assert that distribution tiles show the external button.
When I go to the "Winter of 95" release
Then I should see the link "External" in the "i386" tile

Scenario: Tests the CSV download.
Given users:
| Username | E-mail |
Expand Down Expand Up @@ -140,4 +144,4 @@ Feature: Asset distribution editing.
| ,user1,user1@example.com,text.pdf,"Distribution 1", |
| ,user2,user2@example.com,test.zip,"Distribution 2", |
| ,"Anonymous (not verified)",anon@example.com,test1.zip,"Distribution 3", |
| ,user1,user1@example.com,test1.zip,"Distribution 3", |
| ,user1,user1@example.com,test1.zip,"Distribution 3", |
20 changes: 20 additions & 0 deletions tests/src/Context/JoinupContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,26 @@ public function assertOrderedTilesPresent(TableNode $titles_table) {
Assert::assertEquals($headings_expected, $headings_in_page, 'The expected tiles were not found or were not in the proper order.');
}

/**
* Asserts that a certain link is present in a tile.
*
* @param string $heading
* The heading of the tile.
* @param string $link
* The text of the link.
*
* @throws \Exception
* Thrown when the tile or the link are not found.
*
* @Then I( should) see the link :text in the :heading tile
*/
public function assertTileContainsLink($heading, $link) {
$element = $this->getTileByHeading($heading);
if (!$element->findLink($link)) {
throw new \Exception("The link '$link' was not found in the tile '$heading'.");
}
}

/**
* Asserts that a certain text is present in a tile.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ content:
settings:
hosted_files_title: Download
remote_files_title: External
show_remote_files: false
show_remote_files: true
third_party_settings:
template_suggestion:
template_suggestion: no_wrappers
Expand Down

0 comments on commit 78ee1d9

Please sign in to comment.