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

Refactor open-next e2e tests to be compatible with Multi Site #151

Open
bestickley opened this issue Oct 23, 2023 · 4 comments
Open

Refactor open-next e2e tests to be compatible with Multi Site #151

bestickley opened this issue Oct 23, 2023 · 4 comments
Assignees

Comments

@bestickley
Copy link
Contributor

bestickley commented Oct 23, 2023

Currently, we use example Next.js apps and e2e tests from open-next by using git submodules. This has worked since cdk-nextjs-standalone is using a subset of open-next/NextjsSite's features. However, now that we've added multisite support and potentially future features that NextjsSite doesn't support, we're going to need to pull the Next.js example apps and e2e tests into this repository.

To be more explicit, in order to deploy an example multisite, you have to manually change the next.config.ts for open-next/examples to have basePath. That's a pain. Additionally, the e2e tests use page.goto("/"); which is incompatible with multisite.

@bestickley
Copy link
Contributor Author

@onhate, on second thought, I think we should try to refactor the open-next e2e tests such that a base path can be specified that won't break NextjsSite's usage of the tests and will enable use to test multi-site. We'll still have to figure out specifying basePath (maybe a script that automatically updates next.config.ts?) but I think benefitting from upstream updates in open-next is more valuable than benefits we gain from pulling into our own repo.

@bestickley bestickley changed the title Create Own Example Next.js Apps and E2E Tests Refactor open-next e2e tests to be compatible with Multi Site Oct 28, 2023
@onhate
Copy link
Contributor

onhate commented Oct 28, 2023

It looks like that writing our own apps for the e2e are worth, they don't need to be complex apps, mostly one or two routes to validate things

@bestickley
Copy link
Contributor Author

You think it will be worth it to write our own apps and e2e tests? I agree they don't need to be complex, but we'll definitely need more than 1-2 routes. Check out the open-next example apps and see how many Next.js features are being tested. That's why I think we should work with open-next team so we both benefit instead of separately doing the same thing. Let me know what you think.

@onhate
Copy link
Contributor

onhate commented Oct 31, 2023

I see your point, it makes sense

@bestickley bestickley removed this from the v4 milestone Dec 15, 2023
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

No branches or pull requests

2 participants