Refactor open-next e2e tests to be compatible with Multi Site
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.
@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.
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
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.
I see your point, it makes sense