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

Recording videos and images for documentation #1812

Draft
wants to merge 5 commits into
base: 6.0
Choose a base branch
from
Draft

Conversation

stevepiercy
Copy link
Contributor

@stevepiercy stevepiercy commented Dec 9, 2024

Documentation includes:

  • Initialize and install environment
  • Run servers

See #1611 and plone/Products.CMFPlone#3987


📚 Documentation preview 📚: https://plone6--1812.org.readthedocs.build/

- Initialize and install environment
- Run servers
@stevepiercy stevepiercy self-assigned this Dec 9, 2024
@stevepiercy stevepiercy marked this pull request as draft December 9, 2024 09:25
@stevepiercy stevepiercy requested a review from sneridagh December 9, 2024 09:25
@stevepiercy stevepiercy requested a review from davisagli February 5, 2025 06:07
@stevepiercy
Copy link
Contributor Author

I've pushed this as far as I can, the sample test failed, and I am stuck. I could use an assist to push this forward. See the docs in this PR for details.

I'm also not convinced that Cypress Recorder is the best way forward to create tests, after seeing how slick Playwright is.

.PHONY: recording-init ## Initializes the image and video recording environment
recording-init:
mkdir "$(RECORDINGS)" && cd "$(RECORDINGS)" && pipx run cookieplone --no-input project
cd "$(RECORDINGS)/project-title" && make install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, clever way to get an up-to-date project ready for recording!

Click {guilabel}`Start E2E Testing in Chrome`.

And that's pretty much as far as I got.
Even though I created a page, `/document`, and ran the sample test, it failed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have to create a page, the example test does that. But the example test was broken. 😞 Fixed in plone/cookieplone-templates#138

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fixed now, since I created a dedicated Cypress folder in recordings/cypress, the tests are in there. They will use the generated project as baseline to run. It uses the same approach than the Cookieplone setup.

@stevepiercy let's review it together tomorrow.

@davisagli
Copy link
Member

I'm also not convinced that Cypress Recorder is the best way forward to create tests, after seeing how slick Playwright is.

I don't have experience with either one (only writing Cypress tests in code). I think you can pick whichever one looks more promising. You can still use the same approach for installing a project and starting the backend and frontend. The main differences between the "acceptance" commands for starting Plone and the normal ones are:

  • it runs on port 55001 to avoid conflicting if you've already got a non-test instance running
  • the default credentials are admin/secret instead of admin/admin
  • it runs under bin/robot-server from plone.app.robotframework, which means there are some endpoints exposed so that there's a way for the test runner to reset the instance after each test. I don't recall the details but can find a pointer for you if that sounds useful

@davisagli
Copy link
Member

there are some endpoints exposed so that there's a way for the test runner to reset the instance after each test. I don't recall the details but can find a pointer for you if that sounds useful

That's what the Cypress infrastructure in Volto is doing here:

None of these commands are documented anywhere.
You could run `make help`, and get a dump of the commands, but that lacks context for usage.
See https://github.com/plone/documentation/issues/1758.
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevepiercy this is not true, the commands do what you say below, and in the Makefile help.

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

Successfully merging this pull request may close these issues.

3 participants