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

UI test setup #17

Closed
2 tasks done
S-Panta opened this issue Nov 10, 2023 · 8 comments
Closed
2 tasks done

UI test setup #17

S-Panta opened this issue Nov 10, 2023 · 8 comments
Assignees

Comments

@S-Panta
Copy link
Contributor

S-Panta commented Nov 10, 2023

Set up UI test in Moodle that uses oCIS as the repository.

One of the preconditions of the test is to make sure your Moodle gets access to oCIS. After Oauth2 access is granted, one has to log in to the oCIS once when they select oCIS for upload and choose allow when it asks for permission to read files from oCIS. Note: This process should be done only once.

@S-Panta S-Panta self-assigned this Nov 10, 2023
@PhMemmel
Copy link

Like described in #24 I very much recommend to use the moodle behat framework. Everything is already prepared including pipeline setup etc., one just has to write the feature files including the scenarios. The pipeline will spawn up a complete blank and preconfigured moodle instance, you can then configure the settings for your UI test directly in the feature file. See https://moodledev.io/general/development/tools/behat

@amrita-shrestha
Copy link
Contributor

amrita-shrestha commented Mar 12, 2024

@nirajacharya2 is there more tests to add? please make list of scenario if there is any

@nirajacharya2
Copy link
Contributor

nirajacharya2 commented Mar 12, 2024

@S-Panta
Copy link
Contributor Author

S-Panta commented Mar 19, 2024

Should the steps in feature file be written like this? These steps can be found in many feature files that are inside moodled. I suggest we write these things clearly and inside step definition we call the function that this steps is calling?
For example we can write When I click on Personal drive instead of When I click on "//*[@class='fp-filename-field']/p[text()='Personal']" "xpath_element"
@individual-it @amrita-shrestha @phil-davis @nirajacharya2

@individual-it
Copy link
Member

I think I would prefer to have the xpath hidden in the php function (inside a page object) and not written out in the feature file

@phil-davis
Copy link
Contributor

I think I would prefer to have the xpath hidden in the php function (inside a page object) and not written out in the feature file

I agree.

Do "the moodle people" allow us to create our own step definitions with human-friendly words?
Or do we have to use the steps-for-technical-nerds that moodle already has?

@individual-it
Copy link
Member

I think for our own steps we can do whatever we want, but should be still consistent with the moodle way.
I just feel having the xpath in the step definition will get us into trouble

@S-Panta
Copy link
Contributor Author

S-Panta commented Apr 26, 2024

This issue can be closed as the UI test for moodle is completed.

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

No branches or pull requests

6 participants