Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- tests/behat/behat_theme_adaptable_behat_auth.php duplicated the pat… #31

Closed
wants to merge 1 commit into from

Conversation

eric-s-richer
Copy link

…tern /^I log out$/ which Behat doesn't like. As it turns out, this isn't required as the core step definition works.

  • tests/behat/core_auth/behat_theme_adaptable_behat_core_auth.php is not how you extending existing Behat steps. https://moodledev.io/general/development/tools/behat/writing#override-behat-core-context-for-theme-suite describes how to do this. Regardless, ss it turns out, this isn't required as the core step definition works.

  • Changes to behat_theme_adaptable_behat_navigation.php and behat_theme_adaptable_behat_permissions.php are required because they define duplicate step definition patters which is not something Behat likes. If you take a look at Moodle's \behat_theme_boost_behat_navigation::i_should_see_is_active_in_navigation, they provide an example of how to deal with this.

  • blacklist.json excludes behat_theme_boost_behat_navigation from the list of contexts for the adaptable suite which gets built when you init Behat. For reference, /var/www/behatdata/behatrun/behat/behat.yml should be referred to to better understand why gets configured when Behat is initialized.

  • navigation.feature is a simple Behat test which logs in and out as admin both with javascript enabled and not.

…tern /^I log out$/ which Behat doesn't like. As it turns out, this isn't required as the core step definition works.

- tests/behat/core_auth/behat_theme_adaptable_behat_core_auth.php is not how you extending existing Behat steps.  https://moodledev.io/general/development/tools/behat/writing#override-behat-core-context-for-theme-suite describes how to do this.  Regardless, ss it turns out, this isn't required as the core step definition works.

- Changes to behat_theme_adaptable_behat_navigation.php and behat_theme_adaptable_behat_permissions.php are required because they define duplicate step definition patters which is not something Behat likes.  If you take a look at Moodle's \behat_theme_boost_behat_navigation::i_should_see_is_active_in_navigation, they provide an example of how to deal with this.

- blacklist.json excludes behat_theme_boost_behat_navigation from the list of contexts for the adaptable suite which gets built when you init Behat.  For reference, /var/www/behatdata/behatrun/behat/behat.yml should be referred to to better understand why gets configured when Behat is initialized.

- navigation.feature is a simple Behat test which logs in and out as admin both with javascript enabled and not.
@gjb2048 gjb2048 added the Bug Something isn't working label Aug 12, 2024
@gjb2048
Copy link
Collaborator

gjb2048 commented Aug 12, 2024

@eric-s-richer I've reviewed the changes in the request and I agree with what you're proposing. Please submit a pull request on the 'main' branch in the development repository or state if you'd like me to make the same changes there.

@gjb2048
Copy link
Collaborator

gjb2048 commented Aug 12, 2024

@eric-s-richer Question. Given that the code was originally created such that the core features could be tested against the theme, i.e. with the '--suite' running directive. Have you tried this? I'm told that the tests take many hours to run and even with MySQL using a memory based ramdisk, then I don't believe my machine could run the tests before I needed to sleep again.

@eric-s-richer
Copy link
Author

@eric-s-richer Question. Given that the code was originally created such that the core features could be tested against the theme, i.e. with the '--suite' running directive. Have you tried this? I'm told that the tests take many hours to run and even with MySQL using a memory based ramdisk, then I don't believe my machine could run the tests before I needed to sleep again.

We run Behat tests every night on our CI server. I can confirm that it takes hours to complete.

@eric-s-richer
Copy link
Author

@eric-s-richer I've reviewed the changes in the request and I agree with what you're proposing. Please submit a pull request on the 'main' branch in the development repository or state if you'd like me to make the same changes there.

@gjb2048 I think I'm missing something. Where is the development repo?

@gjb2048
Copy link
Collaborator

gjb2048 commented Aug 13, 2024 via email

@eric-s-richer
Copy link
Author

I'll manage this pull request through the other account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants