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

Add a spec for the Content Object Store #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pezholio
Copy link

@pezholio pezholio commented Oct 9, 2024

This adds a simple test (broken down into Steps) to do an end-to-end test of the basic functionality in the Content Object Store.

Controversially, it does alter state, but is much more stable that similar tests written for Smokey. However, as it accumulates state and is not hidden from the public, it should not be used in any environment other than integration.

I've also added a waitForUrlToBeAvailable helper function that polls a URL (with a cache-busting query string) to wait for it to exist before continuing.

Hopefully this should be a useful proof of concept of a test that alters state.

Comment on lines +81 to +84
page,
await page.getByRole("link", { name: "View on website" }).getAttribute("href")
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmmm it's a shame there's not a why to write the test where we just click on the link instead.

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, it's annoying. I think the issue is there's latency between when we send the document to be published and when it actually gets published. Additionally, if we keep trying to click the link, the page gets cached from the first visit, so we need to add a cachebust param to the URL to force the reload 😞

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.

2 participants