plone / plone.app.robotframework

Provides Robot Framework compatible resources and tools for writing functional Selenium tests (including acceptance tests) for Plone CMS and its add-ons.
https://docs.plone.org/external/plone.app.robotframework/docs/source/index.html
11 stars 17 forks source link

Tests: sleep in 'Wait For Element' and 'Wait For Then Click Element'. #140

Closed mauritsvanrees closed 2 years ago

mauritsvanrees commented 2 years ago

After this sleep, check that the element in question is there only once. Hopefully this will stabilize the Plone core robot tests.

See https://github.com/plone/Products.CMFPlone/issues/3582

mister-roboto commented 2 years ago

@mauritsvanrees thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

mauritsvanrees commented 2 years ago

Test these together:

https://github.com/plone/plone.app.robotframework/pull/140
https://github.com/plone/plone.schemaeditor/pull/94

They are not dependent on each other, but they do similar things, and should hopefully result in more stable robot tests. They will take slightly longer due to explicit sleeps. But as I say in one of these PRs, this is preferable to developers losing sleep over this.

mauritsvanrees commented 2 years ago

There were 7 failures in CMFPlone, which I fix in a PR there.

Since I made two existing keywords (introduced in the last release) stricter, I thought it better to introduce a new keyword Wait For Elements, which still accepts more than one match for the requested element. Not currently used by core Plone, but we might.

Test these together:

https://github.com/plone/plone.app.robotframework/pull/140
https://github.com/plone/plone.schemaeditor/pull/94
https://github.com/plone/Products.CMFPlone/pull/3590
mauritsvanrees commented 2 years ago

All three Jenkins jobs are green! I will start them a second time for good measure.

mauritsvanrees commented 2 years ago

The second time failed on 3.7 and 3.8. I fixed some more in CMFPlone. Trying for the third time now.