Skip to content

Commit c5defdf

Browse files
test(e2e): Keep a static-lifecycle copy of the Vue 3 E2E app
The Vue 3 app is about to move to span streaming. This copy stays on transaction envelopes so the static trace lifecycle remains covered. Version-matrix variants stay on vue-3; this app only needs default static coverage. Co-Authored-By: Cursor Grok 4.6 <cursoragent@cursor.com>
1 parent e57d55c commit c5defdf

32 files changed

Lines changed: 1107 additions & 0 deletions
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
.DS_Store
12+
dist
13+
dist-ssr
14+
coverage
15+
*.local
16+
17+
/cypress/videos/
18+
/cypress/screenshots/
19+
20+
# Editor directories and files
21+
.vscode/*
22+
!.vscode/extensions.json
23+
.idea
24+
*.suo
25+
*.ntvs*
26+
*.njsproj
27+
*.sln
28+
*.sw?
29+
30+
*.tsbuildinfo
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Vue 3 E2E Test App
2+
3+
E2E test app for Vue 3 and `@sentry/vue`.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite App</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "vue-3-static",
3+
"version": "0.0.0",
4+
"private": true,
5+
"type": "module",
6+
"scripts": {
7+
"clean": "npx rimraf node_modules pnpm-lock.yaml dist",
8+
"dev": "vite",
9+
"build": "run-p type-check \"build-only {@}\" --",
10+
"preview": "vite preview",
11+
"build-only": "vite build",
12+
"type-check": "vue-tsc --build --force",
13+
"test": "playwright test",
14+
"test:build": "pnpm install && pnpm build",
15+
"test:assert": "pnpm test:print-version && playwright test",
16+
"test:build-canary": "pnpm install && pnpm test:install-canary && pnpm build",
17+
"test:build-latest": "pnpm install && pnpm add vue@latest && pnpm build",
18+
"test:build-no-options-api": "pnpm install && VUE_OPTIONS_API=false pnpm build",
19+
"test:assert-no-options-api": "VUE_OPTIONS_API=false pnpm test:assert",
20+
"test:install-canary": "pnpm add vue@$(git ls-remote --tags --sort='v:refname' https://github.com/vuejs/core.git | tail -n1 | awk -F'/' '{print $NF}')",
21+
"test:print-version": "node -p \"'Vue version: ' + require('vue/package.json').version\""
22+
},
23+
"dependencies": {
24+
"@sentry/vue": "file:../../packed/sentry-vue-packed.tgz",
25+
"pinia": "^4.0.0",
26+
"vue": "^3.4.15",
27+
"vue-router": "^4.2.5"
28+
},
29+
"devDependencies": {
30+
"@playwright/test": "~1.56.0",
31+
"@sentry-internal/test-utils": "link:../../../test-utils",
32+
"@tsconfig/node20": "^20.1.2",
33+
"@types/node": "^18.19.1",
34+
"@vitejs/plugin-vue": "^5.0.3",
35+
"@vitejs/plugin-vue-jsx": "^3.1.0",
36+
"@vue/tsconfig": "^0.5.1",
37+
"http-server": "^14.1.1",
38+
"npm-run-all2": "^6.2.0",
39+
"typescript": "~5.3.0",
40+
"vite": "^5.4.11",
41+
"vue-tsc": "^1.8.27"
42+
},
43+
"volta": {
44+
"extends": "../../package.json"
45+
}
46+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { getPlaywrightConfig } from '@sentry-internal/test-utils';
2+
3+
const config = getPlaywrightConfig({
4+
startCommand: 'pnpm preview --port 4173',
5+
port: 4173,
6+
});
7+
8+
export default config;
Binary file not shown.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<script setup lang="ts">
2+
import { RouterLink, RouterView } from 'vue-router';
3+
</script>
4+
5+
<template>
6+
<header>
7+
<img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />
8+
9+
<div class="wrapper">
10+
<nav>
11+
<RouterLink to="/">Home</RouterLink>
12+
<RouterLink to="/about">About</RouterLink>
13+
<RouterLink to="/users/123" id="navLink">User 123</RouterLink>
14+
</nav>
15+
</div>
16+
</header>
17+
18+
<RouterView />
19+
</template>
20+
21+
<style scoped>
22+
header {
23+
line-height: 1.5;
24+
max-height: 100vh;
25+
}
26+
27+
.logo {
28+
display: block;
29+
margin: 0 auto 2rem;
30+
}
31+
32+
nav {
33+
width: 100%;
34+
font-size: 12px;
35+
text-align: center;
36+
margin-top: 2rem;
37+
}
38+
39+
nav a.router-link-exact-active {
40+
color: var(--color-text);
41+
}
42+
43+
nav a.router-link-exact-active:hover {
44+
background-color: transparent;
45+
}
46+
47+
nav a {
48+
display: inline-block;
49+
padding: 0 1rem;
50+
border-left: 1px solid var(--color-border);
51+
}
52+
53+
nav a:first-of-type {
54+
border: 0;
55+
}
56+
57+
@media (min-width: 1024px) {
58+
header {
59+
display: flex;
60+
place-items: center;
61+
padding-right: calc(var(--section-gap) / 2);
62+
}
63+
64+
.logo {
65+
margin: 0 2rem 0 0;
66+
}
67+
68+
header .wrapper {
69+
display: flex;
70+
place-items: flex-start;
71+
flex-wrap: wrap;
72+
}
73+
74+
nav {
75+
text-align: left;
76+
margin-left: -1rem;
77+
font-size: 1rem;
78+
79+
padding: 1rem 0;
80+
margin-top: 1rem;
81+
}
82+
}
83+
</style>
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/* color palette from <https://github.com/vuejs/theme> */
2+
:root {
3+
--vt-c-white: #ffffff;
4+
--vt-c-white-soft: #f8f8f8;
5+
--vt-c-white-mute: #f2f2f2;
6+
7+
--vt-c-black: #181818;
8+
--vt-c-black-soft: #222222;
9+
--vt-c-black-mute: #282828;
10+
11+
--vt-c-indigo: #2c3e50;
12+
13+
--vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
14+
--vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
15+
--vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
16+
--vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
17+
18+
--vt-c-text-light-1: var(--vt-c-indigo);
19+
--vt-c-text-light-2: rgba(60, 60, 60, 0.66);
20+
--vt-c-text-dark-1: var(--vt-c-white);
21+
--vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
22+
}
23+
24+
/* semantic color variables for this project */
25+
:root {
26+
--color-background: var(--vt-c-white);
27+
--color-background-soft: var(--vt-c-white-soft);
28+
--color-background-mute: var(--vt-c-white-mute);
29+
30+
--color-border: var(--vt-c-divider-light-2);
31+
--color-border-hover: var(--vt-c-divider-light-1);
32+
33+
--color-heading: var(--vt-c-text-light-1);
34+
--color-text: var(--vt-c-text-light-1);
35+
36+
--section-gap: 160px;
37+
}
38+
39+
@media (prefers-color-scheme: dark) {
40+
:root {
41+
--color-background: var(--vt-c-black);
42+
--color-background-soft: var(--vt-c-black-soft);
43+
--color-background-mute: var(--vt-c-black-mute);
44+
45+
--color-border: var(--vt-c-divider-dark-2);
46+
--color-border-hover: var(--vt-c-divider-dark-1);
47+
48+
--color-heading: var(--vt-c-text-dark-1);
49+
--color-text: var(--vt-c-text-dark-2);
50+
}
51+
}
52+
53+
*,
54+
*::before,
55+
*::after {
56+
box-sizing: border-box;
57+
margin: 0;
58+
font-weight: normal;
59+
}
60+
61+
body {
62+
min-height: 100vh;
63+
color: var(--color-text);
64+
background: var(--color-background);
65+
transition:
66+
color 0.5s,
67+
background-color 0.5s;
68+
line-height: 1.6;
69+
font-family:
70+
Inter,
71+
-apple-system,
72+
BlinkMacSystemFont,
73+
'Segoe UI',
74+
Roboto,
75+
Oxygen,
76+
Ubuntu,
77+
Cantarell,
78+
'Fira Sans',
79+
'Droid Sans',
80+
'Helvetica Neue',
81+
sans-serif;
82+
font-size: 15px;
83+
text-rendering: optimizeLegibility;
84+
-webkit-font-smoothing: antialiased;
85+
-moz-osx-font-smoothing: grayscale;
86+
}
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)