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

Link packages, use examples as end to end tests #802

Open
jvanbruegge opened this issue Apr 19, 2018 · 7 comments
Open

Link packages, use examples as end to end tests #802

jvanbruegge opened this issue Apr 19, 2018 · 7 comments

Comments

@jvanbruegge
Copy link
Member

Currently, the packages when dependend on another, they will use versions from npm. This includes the examples. This leads to some of them (e.g. isomorphic example) to be outdated. I would use yarn workspaces to link the packages against the newest version and add scripts that run end to end tests on the examples on CI. This will automaticly inform us if a change in the framework breaks the examples, so they will be kept up to date.

@staltz
Copy link
Member

staltz commented Apr 19, 2018

Mmm, I agree with most of these changes but the yarn workspace suggestion has some drawbacks.

Thumbs up to updating versions in the examples, and thumbs up for e2e tests in CI that check the examples are fine. But about versioning, it's useful that people can look into the examples folder and just copy into their computer and make it work. That's why they are examples, otherwise we could name them as e2e tests. So it's good if the versions are explicit in the package.json of each example.

That said, there are a couple of ways we could do this. One of them is to run a script that updates the versions in the relevant examples whenever we make a new version. For instance, when we run make release-minor dom, a post-release script would run to go through the example folders and update the versions of dom. But that can cause some chicken-and-egg issues like "how do you detect that this will be a breaking change when it's too late because the change was already released?".

Another way is to a script run-examples-as-e2e that will install the latest local dom no matter what the example's package.json says.

@jvanbruegge
Copy link
Member Author

We could actually do both. Run a script in CI that installs the git HEAD and runs the examples with that and the release script that updates the version in the repo. That way, the examples would be kept up to date and the CI would run with the newest version all the time.

@jvanbruegge jvanbruegge added size L and removed size M labels Apr 19, 2018
@staltz
Copy link
Member

staltz commented Apr 19, 2018

Smart!

@jvanbruegge
Copy link
Member Author

We wont need a script any more due to #818 and the recursive commands

@jvanbruegge jvanbruegge moved this from Short term TODO to In progess in jvanbruegge's pipeline Aug 23, 2018
@jvanbruegge jvanbruegge moved this from In progess to Short term TODO in jvanbruegge's pipeline Aug 23, 2018
@jvanbruegge
Copy link
Member Author

Testcafe looks really nice for this, supports browserstack out of the box

@staltz
Copy link
Member

staltz commented Oct 11, 2018

Testcafe looks interesting!

@IssueHuntBot
Copy link

@issuehuntfest has funded $40.00 to this issue. See it on IssueHunt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
jvanbruegge's pipeline
Short term TODO
Development

No branches or pull requests

3 participants