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

[⚡e2e]: add ability to load starting snippet for testing #2262

Open
ala-n opened this issue Mar 4, 2024 · 3 comments
Open

[⚡e2e]: add ability to load starting snippet for testing #2262

ala-n opened this issue Mar 4, 2024 · 3 comments

Comments

@ala-n
Copy link
Collaborator

ala-n commented Mar 4, 2024

Requirements:

  1. Open an actual test page driven by an 11ty server
    Make sure we can access any page
    e.g. home page we have for scene tests right now

       Given a page "/"

    Make sure we can open a test page

       Given a page "/test/testpage"

    Test page requirements:

    1. All the test pages should be stored under test subpath / subfolder (site/views/test)
    2. Recommended to use the test layout for snippet test pages (create if not exist, based on an empty layout)
    3. It is absolutely critical to make sure that test pages are excluded from any indexes/collections (sitemap, navigation, etc)
  2. (Optional)

   Given a snippet:
   """html
   <div>
        Bal bla bla <my-component></my-component>
   </div>
   """  

(syntax to be clarified)
So the test env automatically opens the empty page and inserts the provided markup

@fshovchko
Copy link
Contributor

Couple of things to point out:

  • (Off topic) our rule check if the screenshot is equal to the snapshoted version has threshold of .25, which is super big. I tried deleting a header from our landing page and test still passed. The test started to fail only on threshold of .02
  • I tried to implement a snippet rule. But apparently doc strings are not supported by stucumber package that we are using. Here is the issue about the topic without any activity: Support for doc strings would be great sjmeverett/stucumber#8
  • What should our test layout have? Is it going to be just a simple extension of empty layout (alias)?

@ala-n
Copy link
Collaborator Author

ala-n commented May 21, 2024

🎉 This issue has been resolved in version 5.0.0-beta.17 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ala-n
Copy link
Collaborator Author

ala-n commented May 31, 2024

🎉 This issue has been resolved in version 4.17.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ala-n ala-n added the released label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants