From b68efcf4c9cf22b3a81ef2de0b1cf5b54ca16a27 Mon Sep 17 00:00:00 2001 From: Luuk Verhoeven Date: Thu, 16 Nov 2023 21:35:37 +0100 Subject: [PATCH] Update behat tests --- .github/workflows/ci.yml | 1 + tests/behat/ajax.feature | 10 +--------- tests/behat/quickcourselist.feature | 12 +----------- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17fcd0d..0454eb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,5 +12,6 @@ jobs: with: #Grunt fails due to CSS styling needing an !important. disable_release : true + disable_phpunit : true release_branches: main min_php : 7.4 \ No newline at end of file diff --git a/tests/behat/ajax.feature b/tests/behat/ajax.feature index f62535e..e29e779 100755 --- a/tests/behat/ajax.feature +++ b/tests/behat/ajax.feature @@ -1,5 +1,5 @@ @block @block_quickcourselist @javascript -Feature: +Feature: Test ajax search in quick course list block As an admin In order to navigate to course pages quickly I need to be able to search for courses by name @@ -36,21 +36,18 @@ Feature: And I should see "C2: Course2" in the "block_quickcourselist" "block" And I should see "C3: Course3" in the "block_quickcourselist" "block" And I should see "Maths101: Course Maths 101" in the "block_quickcourselist" "block" - When I set the field "efquicklistsearch" to "Course1" Then I should see "C1: Course1" in the "block_quickcourselist" "block" And I should see "C1a: Course1a" in the "block_quickcourselist" "block" And I should not see "C2: Course2" in the "block_quickcourselist" "block" And I should not see "C3: Course3" in the "block_quickcourselist" "block" And I should not see "Maths101: Course Maths 101" in the "block_quickcourselist" "block" - When I set the field "efquicklistsearch" to "1a" Then I should not see "C1: Course1" in the "block_quickcourselist" "block" And I should see "C1a: Course1a" in the "block_quickcourselist" "block" And I should not see "C2: Course2" in the "block_quickcourselist" "block" And I should not see "C3: Course3" in the "block_quickcourselist" "block" And I should not see "Maths101: Course Maths 101" in the "block_quickcourselist" "block" - When I set the field "efquicklistsearch" to "Maths101" Then I should not see "C1: Course1" in the "block_quickcourselist" "block" And I should not see "C1a: Course1a" in the "block_quickcourselist" "block" @@ -70,7 +67,6 @@ Feature: And I should see "C2: Course2" in the "block_quickcourselist" "block" And I should see "C3: Course3" in the "block_quickcourselist" "block" And I should see "Maths101: Course Maths 101" in the "block_quickcourselist" "block" - Given I am on course index And I follow "Cat1" When I set the field "efquicklistsearch" to "Course" @@ -79,7 +75,6 @@ Feature: And I should not see "C2: Course2" in the "block_quickcourselist" "block" And I should not see "C3: Course3" in the "block_quickcourselist" "block" And I should not see "Maths101: Course Maths 101" in the "block_quickcourselist" "block" - Given I am on course index And I follow "Cat2" When I set the field "efquicklistsearch" to "Course" @@ -88,7 +83,6 @@ Feature: And I should see "C2: Course2" in the "block_quickcourselist" "block" And I should see "C3: Course3" in the "block_quickcourselist" "block" And I should not see "Maths101: Course Maths 101" in the "block_quickcourselist" "block" - Given I am on course index And I follow "Cat1" And I follow "Cat3" @@ -108,14 +102,12 @@ Feature: When I set the field "efquicklistsearch" to "C" Then I should see "C1" in the "block_quickcourselist" "block" And I should not see "Course1" in the "block_quickcourselist" "block" - Given the following config values are set as admin: | displaymode | 2 | block_quickcourselist | And I am on homepage When I set the field "efquicklistsearch" to "C" Then I should see "Course1" in the "block_quickcourselist" "block" And I should not see "C1" in the "block_quickcourselist" "block" - Given the following config values are set as admin: | displaymode | 3 | block_quickcourselist | And I am on homepage diff --git a/tests/behat/quickcourselist.feature b/tests/behat/quickcourselist.feature index f47f002..c45173f 100755 --- a/tests/behat/quickcourselist.feature +++ b/tests/behat/quickcourselist.feature @@ -1,5 +1,5 @@ @block @block_quickcourselist -Feature: +Feature: Test different settings in quick course list block As an admin In order to navigate to course pages quickly I need to be able to search for courses by name @@ -36,7 +36,6 @@ Feature: And I should see "C2: Course2" in the "block_quickcourselist" "block" And I should see "C3: Course3" in the "block_quickcourselist" "block" And I should see "Maths101: Course Maths 101" in the "block_quickcourselist" "block" - When I set the field "efquicklistsearch" to "Course1" And I press "quickcoursesubmit" Then I should see "C1: Course1" in the "block_quickcourselist" "block" @@ -44,7 +43,6 @@ Feature: And I should not see "C2: Course2" in the "block_quickcourselist" "block" And I should not see "C3: Course3" in the "block_quickcourselist" "block" And I should not see "Maths101: Course Maths 101" in the "block_quickcourselist" "block" - When I set the field "efquicklistsearch" to "1a" And I press "quickcoursesubmit" Then I should not see "C1: Course1" in the "block_quickcourselist" "block" @@ -52,7 +50,6 @@ Feature: And I should not see "C2: Course2" in the "block_quickcourselist" "block" And I should not see "C3: Course3" in the "block_quickcourselist" "block" And I should not see "Maths101: Course Maths 101" in the "block_quickcourselist" "block" - When I set the field "efquicklistsearch" to "Maths101" And I press "quickcoursesubmit" Then I should not see "C1: Course1" in the "block_quickcourselist" "block" @@ -66,7 +63,6 @@ Feature: Given I log in as "admin" And the following config values are set as admin: | restrictcontext | 1 | block_quickcourselist | - When I am on course index And I set the field "efquicklistsearch" to "Course" And I press "quickcoursesubmit" @@ -75,7 +71,6 @@ Feature: And I should see "C2: Course2" in the "block_quickcourselist" "block" And I should see "C3: Course3" in the "block_quickcourselist" "block" And I should see "Maths101: Course Maths 101" in the "block_quickcourselist" "block" - Given I am on course index And I click on "Cat1" "link" When I set the field "efquicklistsearch" to "Course" @@ -85,7 +80,6 @@ Feature: And I should not see "C2: Course2" in the "block_quickcourselist" "block" And I should not see "C3: Course3" in the "block_quickcourselist" "block" And I should not see "Maths101: Course Maths 101" in the "block_quickcourselist" "block" - Given I am on course index And I click on "Cat2" "link" When I set the field "efquicklistsearch" to "Course" @@ -95,7 +89,6 @@ Feature: And I should see "C2: Course2" in the "block_quickcourselist" "block" And I should see "C3: Course3" in the "block_quickcourselist" "block" And I should not see "Maths101: Course Maths 101" in the "block_quickcourselist" "block" - Given I am on course index And I click on "Cat1" "link" And I click on "Cat3" "link" @@ -117,7 +110,6 @@ Feature: And I press "quickcoursesubmit" Then I should see "C1" in the "block_quickcourselist" "block" And I should not see "Course1" in the "block_quickcourselist" "block" - Given the following config values are set as admin: | displaymode | 2 | block_quickcourselist | And I am on course index @@ -125,7 +117,6 @@ Feature: And I press "quickcoursesubmit" Then I should see "Course1" in the "block_quickcourselist" "block" And I should not see "C1" in the "block_quickcourselist" "block" - Given the following config values are set as admin: | displaymode | 3 | block_quickcourselist | And I am on course index @@ -142,4 +133,3 @@ Feature: When I set the field "efquicklistsearch" to "Course 101" And I press "quickcoursesubmit" And I should see "Maths101: Course Maths 101" in the "block_quickcourselist" "block" -