Skip to content

Commit ee259e1

Browse files
test(e2e): add Mosaic UserButton integration suite (#9846)
1 parent 532b18a commit ee259e1

24 files changed

Lines changed: 429 additions & 434 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,9 @@ jobs:
382382
- test-name: 'cache-components'
383383
test-project: 'chrome'
384384
next-version: '16'
385+
- test-name: 'mosaic'
386+
test-project: 'chrome'
387+
next-version: '16'
385388

386389
steps:
387390
- name: Checkout Repo

‎integration/presets/longRunningApps.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ export const createLongRunningApps = () => {
4343
*/
4444
{ id: 'next.appRouterBundledUI.withEmailCodes', config: next.appRouterBundledUI, env: envs.withEmailCodes },
4545

46+
/**
47+
* NextJS apps - Mosaic
48+
*/
49+
{ id: 'next.appRouterMosaic.withEmailCodes', config: next.appRouterMosaic, env: envs.withEmailCodes },
50+
4651
/**
4752
* NextJS apps - cache components
4853
*/

‎integration/presets/next.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,21 @@ const appRouterBundledUI = applicationConfig()
5656
.addDependency('@clerk/shared', PKGLAB)
5757
.addDependency('@clerk/ui', PKGLAB);
5858

59+
const appRouterMosaic = applicationConfig()
60+
.setName('next-app-router-mosaic')
61+
.useTemplate(templates['next-app-router-mosaic'])
62+
.setEnvFormatter('public', key => `NEXT_PUBLIC_${key}`)
63+
.addScript('setup', constants.E2E_NPM_FORCE ? 'pnpm install --force' : 'pnpm install')
64+
.addScript('dev', 'pnpm dev')
65+
.addScript('build', 'pnpm build')
66+
.addScript('serve', 'pnpm start')
67+
.addDependency('next', constants.E2E_NEXTJS_VERSION)
68+
.addDependency('react', constants.E2E_REACT_VERSION)
69+
.addDependency('react-dom', constants.E2E_REACT_DOM_VERSION)
70+
.addDependency('@clerk/nextjs', PKGLAB)
71+
.addDependency('@clerk/shared', PKGLAB)
72+
.addDependency('@clerk/mosaic', PKGLAB);
73+
5974
const cacheComponents = applicationConfig()
6075
.setName('next-cache-components')
6176
.useTemplate(templates['next-cache-components'])
@@ -76,5 +91,6 @@ export const next = {
7691
appRouterAPWithClerkNextV6,
7792
appRouterQuickstartV6,
7893
appRouterBundledUI,
94+
appRouterMosaic,
7995
cacheComponents,
8096
} as const;

‎integration/templates/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export const templates = {
55
'next-cache-components': resolve(import.meta.dirname, './next-cache-components'),
66
'next-app-router-quickstart': resolve(import.meta.dirname, './next-app-router-quickstart'),
77
'next-app-router-bundled-ui': resolve(import.meta.dirname, './next-app-router-bundled-ui'),
8+
'next-app-router-mosaic': resolve(import.meta.dirname, './next-app-router-mosaic'),
89
'next-app-router-quickstart-v6': resolve(import.meta.dirname, './next-app-router-quickstart-v6'),
910
'react-vite': resolve(import.meta.dirname, './react-vite'),
1011
'express-vite': resolve(import.meta.dirname, './express-vite'),
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env*.local
29+
30+
# vercel
31+
.vercel
32+
33+
# typescript
34+
*.tsbuildinfo
35+
next-env.d.ts
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {};
3+
4+
module.exports = nextConfig;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "next-app-router-mosaic",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"build": "next build",
7+
"dev": "next dev",
8+
"lint": "next lint",
9+
"start": "next start"
10+
},
11+
"dependencies": {
12+
"@types/node": "^20.12.12",
13+
"@types/react": "19.2.14",
14+
"@types/react-dom": "19.2.3",
15+
"next": "^15.5.18",
16+
"react": "19.2.4",
17+
"react-dom": "19.2.4",
18+
"typescript": "^5.7.3"
19+
},
20+
"engines": {
21+
"node": ">=22.11.0"
22+
}
23+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function Page() {
2+
return <p>custom-link-target</p>;
3+
}

0 commit comments

Comments
 (0)