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

Example outputs for plugin #8

Merged
merged 2 commits into from
Apr 10, 2023
Merged

Conversation

Scot3004
Copy link
Contributor

@Scot3004 Scot3004 commented Apr 8, 2023

closes #2

Updated cookbook with screenshots and example for each title

image
image
image

Copy link
Member

@perrygoy perrygoy left a 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.

Copy link
Member

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

Comment on lines 9 to 16
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
Copy link
Member

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.

:width: 768
:alt: Screenshot without plugin has not the steps

Attach Screenshot from selenium
Copy link
Member

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!


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>`__
Copy link
Member

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.

),
)

In the github example we go to the github page and find the `screenpy_examples` repository
Copy link
Member

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.)

Copy link
Member

@perrygoy perrygoy left a 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!

@perrygoy perrygoy merged commit 13dbcd1 into ScreenPyHQ:trunk Apr 10, 2023
@Scot3004 Scot3004 deleted the 2-cookbook-example branch April 10, 2023 13:09
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

Successfully merging this pull request may close these issues.

Add example output.
2 participants