Skip to content

Commit

Permalink
Merge branch 'MDL-80404-main' of https://github.com/andelacruz/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed Feb 21, 2024
2 parents 969897c + 6ea99c8 commit 15d399e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions mod/data/tests/behat/view_entries.feature
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,21 @@ Feature: Users can view and search database entries
And I am on the "Test database name" "data activity" page logged in as teacher1
Then I should not see "Select all"
And I should not see "Delete selected"

Scenario Outline: Entries are linked based on autolink and open in new window settings
# Param1 refers to `Autolink`, param3 refers to `Open in new window`.
Given the following "mod_data > fields" exist:
| database | type | name | param1 | param3 |
| data1 | url | URL field name | <param1> | <param3> |
And the following "mod_data > entries" exist:
| database | user | Test field name | Test field 2 name | Test field 3 name | URL field name |
| data1 | teacher1 | Test field entry | Test field 2 entry | http://example.com/ | www.moodle.org |
When I am on the "Test database name" "data activity" page logged in as teacher1
Then "www.moodle.org" "link" <autolink> exist
# Verify that the URL field is rendered as a link with the correct href attribute and target set to _blank.
And "a[target='_blank'][href='http://www.moodle.org']" "css_element" <autolink> exist

Examples:
| param1 | param3 | autolink |
| 0 | 0 | should not |
| 1 | 1 | should |

0 comments on commit 15d399e

Please sign in to comment.