-
Notifications
You must be signed in to change notification settings - Fork 2
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
Example outputs for plugin #8
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again, @Scot3004! I had a few suggestions for this PR, but this is a definite improvement to the docs.
docs/allure_screenshot.png
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a small gripe—would you mind putting the screenshots into an images
folder? So it looks like this:
docs/
- images/
-- allure_screenshot.png
-- allure_with_plugin.png
-- allure_without_plugin.png
docs/cookbook.rst
Outdated
Rationale | ||
========= | ||
|
||
Without this plugin when you generate a test report using allure it will display as follow | ||
|
||
.. image:: ./allure_without_plugin.png | ||
:width: 768 | ||
:alt: Screenshot without plugin has not the steps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this section is necessary—if someone's arrived at this documentation, they are probably here because Allure doesn't show the steps, so they probably don't need to see the "before" shot.
docs/cookbook.rst
Outdated
:width: 768 | ||
:alt: Screenshot without plugin has not the steps | ||
|
||
Attach Screenshot from selenium |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure "Selenium" is capitalized!
docs/cookbook.rst
Outdated
|
||
If you are using allure in a selenium project using `ScreenpPy Selenium <https://screenpy-selenium-docs.readthedocs.io/en/latest/>`__ | ||
|
||
You can attach a new screenshot to the report using the action `SaveScreenshot <https://screenpy-selenium-docs.readthedocs.io/en/latest/extended_api/actions.html#screenpy_selenium.actions.SaveScreenshot>`__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have intersphinx
for exactly this case! First, you'll need to edit docs/conf.py
a little—find the intersphinx_mapping
dict and change it to this:
intersphinx_mapping = {
"screenpy": ("https://screenpy-docs.readthedocs.io/en/latest/", None),
"screenpy_selenium": ("https://screenpy-selenium-docs.readthedocs.io/en/latest/", None),
}
Then, you can make this replacement here:
`SaveScreenshot <https://screenpy-selenium-docs.readthedocs.io/en/latest/extended_api/actions.html#screenpy_selenium.actions.SaveScreenshot>`__
.. to
:external+screenpy_selenium:class:`~screenpy_selenium.actions.SaveScreenshot`
The advantage here is that this link will still work if the URL for SaveScreenshot
changes for some reason.
docs/cookbook.rst
Outdated
), | ||
) | ||
|
||
In the github example we go to the github page and find the `screenpy_examples` repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could link the github example here:
In the `github example <https://github.com/ScreenPyHQ/screenpy_examples/blob/trunk/screenpy_selenium/github/features/test_github_search.py#L44-L54>`__,
we go to the github page
and find the ``screenpy_examples`` repository
(note the double-`s around screenpy_examples—RST uses backticks as special characters, so you need to double them if you want it to look like code instead.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick turnaround, and for improving the docs!
closes #2
Updated cookbook with screenshots and example for each title