Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Fixed some points of failure in behat tests #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

t-schroeder
Copy link

This fixes the easy to fix stuff mentioned in #31.

@abias
Copy link
Member

abias commented Mar 28, 2019

Hi @t-schroeder ,

thank you for this pull request. I have to admit that we haven't covered this plugin with Behat tests before as it has a really old and quite complicated code base.

However, it should not create problems for Moodle core's Behat tests.

Looking at your patch, I am afraid that you are fixing the symptoms and not the reason of the problem. Thus, I hesitate to merge your patch without knowing the reason.

What I can say is that $coc_config->firstrowcoursename as well as $coc_config->termmode are config settings of the type admin_setting_configselect. The debug message says that there is no value set for these settings, but if you look at https://github.com/moodleuulm/moodle-block_course_overview_campus/blob/master/settings.php#L132, you will see that a default value is set at installation time. Furthermore, these debug message don't appear when installed manually on a vanilla Moodle instance.

My gut feeling tells me that there could be a problem with default values of admin_setting_configselect in Behat tests which should be examined. At least it feels wrong to strike the problem dead with isset() for these two settings while all other settings work fine without isset().

Do you have time to dig into this problem in Moodle core?

@t-schroeder
Copy link
Author

Hi @abias ,

thanks for looking this over. Unfortunately I won't have time to look further into this in the near future.

@abias
Copy link
Member

abias commented Apr 11, 2019

Hi @t-schroeder ,

Out of curiosity, I just tried to reproduce the problem which you have reported, but wasn't able to reproduce it yet. I added the block plugin to a fresh Moodle master codebase and ran Behat Tests with --tags=@block without problems.

You wrote in #31:

When running behat tests with this plugin installed and set as a default block on the user's dashboard [...]

Can you tell me which Behat test from Moodle core you ran or provide me your custom Behat test so that I can reproduce the problem here?

Cheers,
Alex

@t-schroeder
Copy link
Author

Hi @abias ,

I actually ran the behat tests for the calendar. And I had this block set as a default dashboard block (under Site administration > Appearance > Default Dashboard Page). These were calendar tests, but you still log in and visit the dashboard.

I haven't run these tests for a while so I don't know if the issue is still there.

Regards,
Tim

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants