From 8f60a02d5fec9b04ae1b3b52f43b561c81a155a4 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Sat, 6 May 2017 20:46:58 +0200 Subject: [PATCH] MDL-58704 behat: Restrict search to the target tab (by css_element) The existing search is too broad, and the text being searched exists a number of times in the block, all them hidden, but one (the one where we want to really check for the existence of the text). So this patch only changes the search from block to the target tab, doing it by css element id. Ideally we should be able to search in tabs more naturally, but we don't have support for that right now. --- .../myoverview/tests/behat/block_myoverview_progress.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blocks/myoverview/tests/behat/block_myoverview_progress.feature b/blocks/myoverview/tests/behat/block_myoverview_progress.feature index d361f870479..8bd3afe7f3e 100644 --- a/blocks/myoverview/tests/behat/block_myoverview_progress.feature +++ b/blocks/myoverview/tests/behat/block_myoverview_progress.feature @@ -24,7 +24,7 @@ Feature: Course overview block show users their progress on courses Given I log in as "student1" And I click on "Timeline" "link" in the "Course overview" "block" When I click on "Sort by courses" "link" in the "Course overview" "block" - Then I should see "Choice Test choice 1 closes" in the "Course overview" "block" + Then I should see "Choice Test choice 1 closes" in the "#myoverview_timeline_courses" "css_element" And I should not see "0%" in the "Course overview" "block" And I click on "Courses" "link" in the "Course overview" "block" And I click on "In progress" "link" in the "Course overview" "block" @@ -44,7 +44,7 @@ Feature: Course overview block show users their progress on courses And I log out And I log in as "student1" And I click on "Sort by courses" "link" in the "Course overview" "block" - And I should see "Choice Test choice 1 closes" in the "Course overview" "block" + And I should see "Choice Test choice 1 closes" in the "#myoverview_timeline_courses" "css_element" And I should see "0%" in the "Course overview" "block" And I click on "Courses" "link" in the "Course overview" "block" When I click on "In progress" "link" in the "Course overview" "block"