sunpeak 0.17.7 → 0.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -44
- package/bin/commands/dev.mjs +5 -6
- package/bin/commands/inspect.mjs +17 -18
- package/bin/lib/inspect/inspect-config.d.mts +2 -2
- package/bin/lib/inspect/inspect-config.mjs +2 -2
- package/bin/lib/live/chatgpt-page.mjs +2 -2
- package/bin/lib/live/host-page.mjs +3 -8
- package/bin/lib/sandbox-server.mjs +11 -11
- package/bin/sunpeak.js +3 -3
- package/dist/chatgpt/chatgpt-conversation.d.ts +1 -1
- package/dist/chatgpt/index.cjs +20 -20
- package/dist/chatgpt/index.cjs.map +1 -1
- package/dist/chatgpt/index.d.ts +10 -10
- package/dist/chatgpt/index.js +5 -5
- package/dist/chatgpt/index.js.map +1 -1
- package/dist/claude/claude-conversation.d.ts +1 -1
- package/dist/claude/index.cjs +2 -2
- package/dist/claude/index.d.ts +1 -1
- package/dist/claude/index.js +2 -2
- package/dist/host/chatgpt/index.cjs +0 -40
- package/dist/host/chatgpt/index.cjs.map +1 -1
- package/dist/host/chatgpt/index.d.ts +0 -3
- package/dist/host/chatgpt/index.js +1 -40
- package/dist/host/chatgpt/index.js.map +1 -1
- package/dist/host/index.cjs +1 -4
- package/dist/host/index.cjs.map +1 -1
- package/dist/host/index.d.ts +1 -5
- package/dist/host/index.js +2 -4
- package/dist/host/index.js.map +1 -1
- package/dist/index.cjs +9 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/{simulator → inspector}/hosts.d.ts +3 -3
- package/dist/{simulator → inspector}/iframe-resource.d.ts +3 -3
- package/dist/inspector/index.cjs +74 -0
- package/dist/{simulator → inspector}/index.cjs.map +1 -1
- package/dist/{simulator → inspector}/index.d.ts +8 -8
- package/dist/{simulator → inspector}/index.js +8 -8
- package/dist/{simulator → inspector}/index.js.map +1 -1
- package/dist/{simulator/simulator-types.d.ts → inspector/inspector-types.d.ts} +1 -1
- package/dist/{simulator/simulator-url.d.ts → inspector/inspector-url.d.ts} +15 -15
- package/dist/{simulator/simulator.d.ts → inspector/inspector.d.ts} +3 -3
- package/dist/{simulator → inspector}/mcp-app-host.d.ts +5 -5
- package/dist/{simulator → inspector}/mock-openai-runtime.d.ts +2 -2
- package/dist/{simulator → inspector}/sandbox-proxy.d.ts +1 -1
- package/dist/{simulator/use-simulator-state.d.ts → inspector/use-inspector-state.d.ts} +4 -4
- package/dist/{simulator → inspector}/use-mcp-connection.d.ts +1 -1
- package/dist/{simulator-eU6sQTje.cjs → inspector-CByJjmPD.cjs} +51 -52
- package/dist/{simulator-eU6sQTje.cjs.map → inspector-CByJjmPD.cjs.map} +1 -1
- package/dist/{simulator-0dAb16Qt.js → inspector-ClhpqKLi.js} +42 -43
- package/dist/{simulator-0dAb16Qt.js.map → inspector-ClhpqKLi.js.map} +1 -1
- package/dist/{simulator-url-3ATCsPOT.cjs → inspector-url-7qhtJwY6.cjs} +10 -10
- package/dist/{simulator-url-3ATCsPOT.cjs.map → inspector-url-7qhtJwY6.cjs.map} +1 -1
- package/dist/{simulator-url-BbuuWa7S.js → inspector-url-DuEFmxLP.js} +9 -9
- package/dist/{simulator-url-BbuuWa7S.js.map → inspector-url-DuEFmxLP.js.map} +1 -1
- package/dist/mcp/index.cjs +146 -12
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.js +143 -14
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/production-server.d.ts +14 -0
- package/dist/mcp/resolve-domain.d.ts +55 -0
- package/dist/mcp/types.d.ts +1 -1
- package/dist/style.css +12 -12
- package/dist/types/resource-config.d.ts +20 -1
- package/dist/types/simulation.d.ts +1 -1
- package/package.json +7 -20
- package/template/dist/albums/albums.html +1 -1
- package/template/dist/albums/albums.json +1 -1
- package/template/dist/carousel/carousel.html +1 -1
- package/template/dist/carousel/carousel.json +1 -1
- package/template/dist/map/map.html +1 -1
- package/template/dist/map/map.json +1 -1
- package/template/dist/review/review.html +1 -1
- package/template/dist/review/review.json +1 -1
- package/template/playwright.config.ts +1 -1
- package/template/src/index-resource.tsx +1 -1
- package/template/src/styles/globals.css +2 -2
- package/template/tests/e2e/albums.spec.ts +13 -13
- package/template/tests/e2e/carousel.spec.ts +11 -11
- package/template/tests/e2e/map.spec.ts +16 -16
- package/template/tests/e2e/review.spec.ts +25 -25
- package/dist/chatgpt/globals.css +0 -2642
- package/dist/host/chatgpt/use-file-download.d.ts +0 -33
- package/dist/simulator/index.cjs +0 -74
- /package/dist/{simulator → inspector}/host-styles.d.ts +0 -0
- /package/dist/{simulator → inspector}/simple-sidebar.d.ts +0 -0
- /package/dist/{simulator → inspector}/theme-provider.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { test, expect } from '@playwright/test';
|
|
2
|
-
import {
|
|
2
|
+
import { createInspectorUrl } from 'sunpeak/chatgpt';
|
|
3
3
|
|
|
4
4
|
const hosts = ['chatgpt', 'claude'] as const;
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ for (const host of hosts) {
|
|
|
7
7
|
test.describe(`Carousel Resource [${host}]`, () => {
|
|
8
8
|
test.describe('Light Mode', () => {
|
|
9
9
|
test('should render carousel cards with correct styles', async ({ page }) => {
|
|
10
|
-
await page.goto(
|
|
10
|
+
await page.goto(createInspectorUrl({ simulation: 'show-carousel', theme: 'light', host }));
|
|
11
11
|
|
|
12
12
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
13
13
|
const card = iframe.locator('.rounded-2xl').first();
|
|
@@ -26,7 +26,7 @@ for (const host of hosts) {
|
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
test('should have card with border styling', async ({ page }) => {
|
|
29
|
-
await page.goto(
|
|
29
|
+
await page.goto(createInspectorUrl({ simulation: 'show-carousel', theme: 'light', host }));
|
|
30
30
|
|
|
31
31
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
32
32
|
const card = iframe.locator('.rounded-2xl.border').first();
|
|
@@ -45,7 +45,7 @@ for (const host of hosts) {
|
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
test('should have interactive buttons', async ({ page }) => {
|
|
48
|
-
await page.goto(
|
|
48
|
+
await page.goto(createInspectorUrl({ simulation: 'show-carousel', theme: 'light', host }));
|
|
49
49
|
|
|
50
50
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
51
51
|
const visitButton = iframe.locator('button:has-text("Visit")').first();
|
|
@@ -64,7 +64,7 @@ for (const host of hosts) {
|
|
|
64
64
|
|
|
65
65
|
test.describe('Prod Tools Mode', () => {
|
|
66
66
|
test('should show empty state with Run button', async ({ page }) => {
|
|
67
|
-
await page.goto(
|
|
67
|
+
await page.goto(createInspectorUrl({ tool: 'show-carousel', theme: 'dark', host }));
|
|
68
68
|
|
|
69
69
|
const emptyState = page.locator('text=Press Run to call the tool');
|
|
70
70
|
await expect(emptyState).toBeVisible();
|
|
@@ -77,7 +77,7 @@ for (const host of hosts) {
|
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
test('should have themed empty state colors in light mode', async ({ page }) => {
|
|
80
|
-
await page.goto(
|
|
80
|
+
await page.goto(createInspectorUrl({ tool: 'show-carousel', theme: 'light', host }));
|
|
81
81
|
|
|
82
82
|
const emptyState = page.locator('text=Press Run to call the tool');
|
|
83
83
|
await expect(emptyState).toBeVisible();
|
|
@@ -91,7 +91,7 @@ for (const host of hosts) {
|
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
test('should have themed empty state colors in dark mode', async ({ page }) => {
|
|
94
|
-
await page.goto(
|
|
94
|
+
await page.goto(createInspectorUrl({ tool: 'show-carousel', theme: 'dark', host }));
|
|
95
95
|
|
|
96
96
|
const emptyState = page.locator('text=Press Run to call the tool');
|
|
97
97
|
await expect(emptyState).toBeVisible();
|
|
@@ -108,7 +108,7 @@ for (const host of hosts) {
|
|
|
108
108
|
test.describe('Prod Resources Mode', () => {
|
|
109
109
|
test('should activate without errors', async ({ page }) => {
|
|
110
110
|
await page.goto(
|
|
111
|
-
|
|
111
|
+
createInspectorUrl({
|
|
112
112
|
simulation: 'show-carousel',
|
|
113
113
|
theme: 'dark',
|
|
114
114
|
host,
|
|
@@ -123,7 +123,7 @@ for (const host of hosts) {
|
|
|
123
123
|
|
|
124
124
|
test.describe('Dark Mode', () => {
|
|
125
125
|
test('should render carousel cards with correct styles', async ({ page }) => {
|
|
126
|
-
await page.goto(
|
|
126
|
+
await page.goto(createInspectorUrl({ simulation: 'show-carousel', theme: 'dark', host }));
|
|
127
127
|
|
|
128
128
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
129
129
|
const card = iframe.locator('.rounded-2xl').first();
|
|
@@ -142,7 +142,7 @@ for (const host of hosts) {
|
|
|
142
142
|
});
|
|
143
143
|
|
|
144
144
|
test('should have appropriate styling for dark mode', async ({ page }) => {
|
|
145
|
-
await page.goto(
|
|
145
|
+
await page.goto(createInspectorUrl({ simulation: 'show-carousel', theme: 'dark', host }));
|
|
146
146
|
|
|
147
147
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
148
148
|
// Select card by its border + rounded combo
|
|
@@ -169,7 +169,7 @@ for (const host of hosts) {
|
|
|
169
169
|
}
|
|
170
170
|
});
|
|
171
171
|
|
|
172
|
-
await page.goto(
|
|
172
|
+
await page.goto(createInspectorUrl({ simulation: 'show-carousel', theme: 'dark', host }));
|
|
173
173
|
|
|
174
174
|
// Wait for iframe content to render
|
|
175
175
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { test, expect } from '@playwright/test';
|
|
2
|
-
import {
|
|
2
|
+
import { createInspectorUrl } from 'sunpeak/chatgpt';
|
|
3
3
|
|
|
4
4
|
const hosts = ['chatgpt', 'claude'] as const;
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ for (const host of hosts) {
|
|
|
7
7
|
test.describe(`Map Resource [${host}]`, () => {
|
|
8
8
|
test.describe('Light Mode', () => {
|
|
9
9
|
test('should render map container with correct styles', async ({ page }) => {
|
|
10
|
-
await page.goto(
|
|
10
|
+
await page.goto(createInspectorUrl({ simulation: 'show-map', theme: 'light', host }));
|
|
11
11
|
|
|
12
12
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
13
13
|
const mapContainer = iframe.locator('.antialiased.w-full.overflow-hidden').first();
|
|
@@ -25,7 +25,7 @@ for (const host of hosts) {
|
|
|
25
25
|
|
|
26
26
|
test('should have rounded border in inline mode', async ({ page }) => {
|
|
27
27
|
await page.goto(
|
|
28
|
-
|
|
28
|
+
createInspectorUrl({
|
|
29
29
|
simulation: 'show-map',
|
|
30
30
|
theme: 'light',
|
|
31
31
|
displayMode: 'inline',
|
|
@@ -51,7 +51,7 @@ for (const host of hosts) {
|
|
|
51
51
|
|
|
52
52
|
test('should have fullscreen expand button in inline mode', async ({ page }) => {
|
|
53
53
|
await page.goto(
|
|
54
|
-
|
|
54
|
+
createInspectorUrl({
|
|
55
55
|
simulation: 'show-map',
|
|
56
56
|
theme: 'light',
|
|
57
57
|
displayMode: 'inline',
|
|
@@ -83,7 +83,7 @@ for (const host of hosts) {
|
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
-
await page.goto(
|
|
86
|
+
await page.goto(createInspectorUrl({ simulation: 'show-map', theme: 'light', host }));
|
|
87
87
|
|
|
88
88
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
89
89
|
const mapContainer = iframe.locator('.antialiased.w-full.overflow-hidden').first();
|
|
@@ -103,7 +103,7 @@ for (const host of hosts) {
|
|
|
103
103
|
|
|
104
104
|
test.describe('Prod Tools Mode', () => {
|
|
105
105
|
test('should show empty state with Run button', async ({ page }) => {
|
|
106
|
-
await page.goto(
|
|
106
|
+
await page.goto(createInspectorUrl({ tool: 'show-map', theme: 'dark', host }));
|
|
107
107
|
|
|
108
108
|
const emptyState = page.locator('text=Press Run to call the tool');
|
|
109
109
|
await expect(emptyState).toBeVisible();
|
|
@@ -116,7 +116,7 @@ for (const host of hosts) {
|
|
|
116
116
|
});
|
|
117
117
|
|
|
118
118
|
test('should have themed empty state colors in light mode', async ({ page }) => {
|
|
119
|
-
await page.goto(
|
|
119
|
+
await page.goto(createInspectorUrl({ tool: 'show-map', theme: 'light', host }));
|
|
120
120
|
|
|
121
121
|
const emptyState = page.locator('text=Press Run to call the tool');
|
|
122
122
|
await expect(emptyState).toBeVisible();
|
|
@@ -130,7 +130,7 @@ for (const host of hosts) {
|
|
|
130
130
|
});
|
|
131
131
|
|
|
132
132
|
test('should have themed empty state colors in dark mode', async ({ page }) => {
|
|
133
|
-
await page.goto(
|
|
133
|
+
await page.goto(createInspectorUrl({ tool: 'show-map', theme: 'dark', host }));
|
|
134
134
|
|
|
135
135
|
const emptyState = page.locator('text=Press Run to call the tool');
|
|
136
136
|
await expect(emptyState).toBeVisible();
|
|
@@ -147,7 +147,7 @@ for (const host of hosts) {
|
|
|
147
147
|
test.describe('Prod Resources Mode', () => {
|
|
148
148
|
test('should activate without errors', async ({ page }) => {
|
|
149
149
|
await page.goto(
|
|
150
|
-
|
|
150
|
+
createInspectorUrl({ simulation: 'show-map', theme: 'dark', host, prodResources: true })
|
|
151
151
|
);
|
|
152
152
|
|
|
153
153
|
const root = page.locator('#root');
|
|
@@ -157,7 +157,7 @@ for (const host of hosts) {
|
|
|
157
157
|
|
|
158
158
|
test.describe('Dark Mode', () => {
|
|
159
159
|
test('should render map container with correct styles', async ({ page }) => {
|
|
160
|
-
await page.goto(
|
|
160
|
+
await page.goto(createInspectorUrl({ simulation: 'show-map', theme: 'dark', host }));
|
|
161
161
|
|
|
162
162
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
163
163
|
const mapContainer = iframe.locator('.antialiased.w-full.overflow-hidden').first();
|
|
@@ -166,7 +166,7 @@ for (const host of hosts) {
|
|
|
166
166
|
|
|
167
167
|
test('should have appropriate border color for dark mode', async ({ page }) => {
|
|
168
168
|
await page.goto(
|
|
169
|
-
|
|
169
|
+
createInspectorUrl({
|
|
170
170
|
simulation: 'show-map',
|
|
171
171
|
theme: 'dark',
|
|
172
172
|
displayMode: 'inline',
|
|
@@ -197,7 +197,7 @@ for (const host of hosts) {
|
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
199
|
|
|
200
|
-
await page.goto(
|
|
200
|
+
await page.goto(createInspectorUrl({ simulation: 'show-map', theme: 'dark', host }));
|
|
201
201
|
|
|
202
202
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
203
203
|
const mapContainer = iframe.locator('.antialiased.w-full.overflow-hidden').first();
|
|
@@ -218,7 +218,7 @@ for (const host of hosts) {
|
|
|
218
218
|
test.describe('Fullscreen Mode', () => {
|
|
219
219
|
test('should not have rounded border in fullscreen mode', async ({ page }) => {
|
|
220
220
|
await page.goto(
|
|
221
|
-
|
|
221
|
+
createInspectorUrl({
|
|
222
222
|
simulation: 'show-map',
|
|
223
223
|
theme: 'light',
|
|
224
224
|
displayMode: 'fullscreen',
|
|
@@ -242,7 +242,7 @@ for (const host of hosts) {
|
|
|
242
242
|
|
|
243
243
|
test('should not show fullscreen button when already in fullscreen', async ({ page }) => {
|
|
244
244
|
await page.goto(
|
|
245
|
-
|
|
245
|
+
createInspectorUrl({
|
|
246
246
|
simulation: 'show-map',
|
|
247
247
|
theme: 'light',
|
|
248
248
|
displayMode: 'fullscreen',
|
|
@@ -261,7 +261,7 @@ for (const host of hosts) {
|
|
|
261
261
|
|
|
262
262
|
test('should show place list sidebar in fullscreen', async ({ page }) => {
|
|
263
263
|
await page.goto(
|
|
264
|
-
|
|
264
|
+
createInspectorUrl({
|
|
265
265
|
simulation: 'show-map',
|
|
266
266
|
theme: 'dark',
|
|
267
267
|
displayMode: 'fullscreen',
|
|
@@ -278,7 +278,7 @@ for (const host of hosts) {
|
|
|
278
278
|
// Set viewport to desktop size
|
|
279
279
|
await page.setViewportSize({ width: 1024, height: 768 });
|
|
280
280
|
await page.goto(
|
|
281
|
-
|
|
281
|
+
createInspectorUrl({
|
|
282
282
|
simulation: 'show-map',
|
|
283
283
|
theme: 'light',
|
|
284
284
|
displayMode: 'fullscreen',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { test, expect } from '@playwright/test';
|
|
2
|
-
import {
|
|
2
|
+
import { createInspectorUrl } from 'sunpeak/chatgpt';
|
|
3
3
|
|
|
4
4
|
const hosts = ['chatgpt', 'claude'] as const;
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ for (const host of hosts) {
|
|
|
7
7
|
test.describe(`Review Resource [${host}]`, () => {
|
|
8
8
|
test.describe('Light Mode', () => {
|
|
9
9
|
test('should render review title with correct styles', async ({ page }) => {
|
|
10
|
-
await page.goto(
|
|
10
|
+
await page.goto(createInspectorUrl({ simulation: 'review-diff', theme: 'light', host }));
|
|
11
11
|
|
|
12
12
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
13
13
|
const title = iframe.locator('h1:has-text("Refactor Authentication Module")');
|
|
@@ -25,7 +25,7 @@ for (const host of hosts) {
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
test('should render change items with type-specific styling', async ({ page }) => {
|
|
28
|
-
await page.goto(
|
|
28
|
+
await page.goto(createInspectorUrl({ simulation: 'review-diff', theme: 'light', host }));
|
|
29
29
|
|
|
30
30
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
31
31
|
const changeItem = iframe.locator('li').first();
|
|
@@ -45,7 +45,7 @@ for (const host of hosts) {
|
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
test('should have interactive apply and cancel buttons', async ({ page }) => {
|
|
48
|
-
await page.goto(
|
|
48
|
+
await page.goto(createInspectorUrl({ simulation: 'review-diff', theme: 'light', host }));
|
|
49
49
|
|
|
50
50
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
51
51
|
|
|
@@ -76,7 +76,7 @@ for (const host of hosts) {
|
|
|
76
76
|
|
|
77
77
|
test('should have expand fullscreen button in inline mode', async ({ page }) => {
|
|
78
78
|
await page.goto(
|
|
79
|
-
|
|
79
|
+
createInspectorUrl({
|
|
80
80
|
simulation: 'review-diff',
|
|
81
81
|
theme: 'light',
|
|
82
82
|
displayMode: 'inline',
|
|
@@ -101,7 +101,7 @@ for (const host of hosts) {
|
|
|
101
101
|
|
|
102
102
|
test.describe('Prod Tools Mode', () => {
|
|
103
103
|
test('should show empty state with Run button', async ({ page }) => {
|
|
104
|
-
await page.goto(
|
|
104
|
+
await page.goto(createInspectorUrl({ tool: 'review-diff', theme: 'dark', host }));
|
|
105
105
|
|
|
106
106
|
const emptyState = page.locator('text=Press Run to call the tool');
|
|
107
107
|
await expect(emptyState).toBeVisible();
|
|
@@ -114,7 +114,7 @@ for (const host of hosts) {
|
|
|
114
114
|
});
|
|
115
115
|
|
|
116
116
|
test('should have themed empty state colors in light mode', async ({ page }) => {
|
|
117
|
-
await page.goto(
|
|
117
|
+
await page.goto(createInspectorUrl({ tool: 'review-diff', theme: 'light', host }));
|
|
118
118
|
|
|
119
119
|
const emptyState = page.locator('text=Press Run to call the tool');
|
|
120
120
|
await expect(emptyState).toBeVisible();
|
|
@@ -128,7 +128,7 @@ for (const host of hosts) {
|
|
|
128
128
|
});
|
|
129
129
|
|
|
130
130
|
test('should have themed empty state colors in dark mode', async ({ page }) => {
|
|
131
|
-
await page.goto(
|
|
131
|
+
await page.goto(createInspectorUrl({ tool: 'review-diff', theme: 'dark', host }));
|
|
132
132
|
|
|
133
133
|
const emptyState = page.locator('text=Press Run to call the tool');
|
|
134
134
|
await expect(emptyState).toBeVisible();
|
|
@@ -145,7 +145,7 @@ for (const host of hosts) {
|
|
|
145
145
|
test.describe('Prod Resources Mode', () => {
|
|
146
146
|
test('should activate without errors', async ({ page }) => {
|
|
147
147
|
await page.goto(
|
|
148
|
-
|
|
148
|
+
createInspectorUrl({
|
|
149
149
|
simulation: 'review-diff',
|
|
150
150
|
theme: 'dark',
|
|
151
151
|
host,
|
|
@@ -160,7 +160,7 @@ for (const host of hosts) {
|
|
|
160
160
|
|
|
161
161
|
test.describe('Dark Mode', () => {
|
|
162
162
|
test('should render review title with correct styles', async ({ page }) => {
|
|
163
|
-
await page.goto(
|
|
163
|
+
await page.goto(createInspectorUrl({ simulation: 'review-diff', theme: 'dark', host }));
|
|
164
164
|
|
|
165
165
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
166
166
|
const title = iframe.locator('h1:has-text("Refactor Authentication Module")');
|
|
@@ -168,7 +168,7 @@ for (const host of hosts) {
|
|
|
168
168
|
});
|
|
169
169
|
|
|
170
170
|
test('should have appropriate text colors for dark mode', async ({ page }) => {
|
|
171
|
-
await page.goto(
|
|
171
|
+
await page.goto(createInspectorUrl({ simulation: 'review-diff', theme: 'dark', host }));
|
|
172
172
|
|
|
173
173
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
174
174
|
const title = iframe.locator('h1').first();
|
|
@@ -186,7 +186,7 @@ for (const host of hosts) {
|
|
|
186
186
|
});
|
|
187
187
|
|
|
188
188
|
test('should render change items in dark mode', async ({ page }) => {
|
|
189
|
-
await page.goto(
|
|
189
|
+
await page.goto(createInspectorUrl({ simulation: 'review-diff', theme: 'dark', host }));
|
|
190
190
|
|
|
191
191
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
192
192
|
const changeItem = iframe.locator('li').first();
|
|
@@ -201,7 +201,7 @@ for (const host of hosts) {
|
|
|
201
201
|
}
|
|
202
202
|
});
|
|
203
203
|
|
|
204
|
-
await page.goto(
|
|
204
|
+
await page.goto(createInspectorUrl({ simulation: 'review-diff', theme: 'dark', host }));
|
|
205
205
|
|
|
206
206
|
// Wait for iframe content to render
|
|
207
207
|
const iframe = page.frameLocator('iframe').frameLocator('iframe');
|
|
@@ -222,7 +222,7 @@ for (const host of hosts) {
|
|
|
222
222
|
test.describe('Fullscreen Mode', () => {
|
|
223
223
|
test('should not show fullscreen button when already in fullscreen', async ({ page }) => {
|
|
224
224
|
await page.goto(
|
|
225
|
-
|
|
225
|
+
createInspectorUrl({
|
|
226
226
|
simulation: 'review-diff',
|
|
227
227
|
theme: 'light',
|
|
228
228
|
displayMode: 'fullscreen',
|
|
@@ -241,7 +241,7 @@ for (const host of hosts) {
|
|
|
241
241
|
|
|
242
242
|
test('should render content correctly in fullscreen', async ({ page }) => {
|
|
243
243
|
await page.goto(
|
|
244
|
-
|
|
244
|
+
createInspectorUrl({
|
|
245
245
|
simulation: 'review-diff',
|
|
246
246
|
theme: 'dark',
|
|
247
247
|
displayMode: 'fullscreen',
|
|
@@ -261,7 +261,7 @@ for (const host of hosts) {
|
|
|
261
261
|
|
|
262
262
|
test('should render content in fullscreen mode', async ({ page }) => {
|
|
263
263
|
await page.goto(
|
|
264
|
-
|
|
264
|
+
createInspectorUrl({
|
|
265
265
|
simulation: 'review-diff',
|
|
266
266
|
theme: 'light',
|
|
267
267
|
displayMode: 'fullscreen',
|
|
@@ -282,7 +282,7 @@ for (const host of hosts) {
|
|
|
282
282
|
|
|
283
283
|
test.describe('Review Post Simulation', () => {
|
|
284
284
|
test('should render post review in light mode', async ({ page }) => {
|
|
285
|
-
await page.goto(
|
|
285
|
+
await page.goto(createInspectorUrl({ simulation: 'review-post', theme: 'light', host }));
|
|
286
286
|
|
|
287
287
|
await page.waitForLoadState('networkidle');
|
|
288
288
|
|
|
@@ -292,7 +292,7 @@ for (const host of hosts) {
|
|
|
292
292
|
});
|
|
293
293
|
|
|
294
294
|
test('should render post review in dark mode', async ({ page }) => {
|
|
295
|
-
await page.goto(
|
|
295
|
+
await page.goto(createInspectorUrl({ simulation: 'review-post', theme: 'dark', host }));
|
|
296
296
|
|
|
297
297
|
await page.waitForLoadState('networkidle');
|
|
298
298
|
|
|
@@ -302,7 +302,7 @@ for (const host of hosts) {
|
|
|
302
302
|
|
|
303
303
|
test('should show server success message when confirming', async ({ page }) => {
|
|
304
304
|
await page.goto(
|
|
305
|
-
|
|
305
|
+
createInspectorUrl({
|
|
306
306
|
simulation: 'review-post',
|
|
307
307
|
theme: 'dark',
|
|
308
308
|
host,
|
|
@@ -324,7 +324,7 @@ for (const host of hosts) {
|
|
|
324
324
|
|
|
325
325
|
test('should show server cancel message when rejecting', async ({ page }) => {
|
|
326
326
|
await page.goto(
|
|
327
|
-
|
|
327
|
+
createInspectorUrl({
|
|
328
328
|
simulation: 'review-post',
|
|
329
329
|
theme: 'dark',
|
|
330
330
|
host,
|
|
@@ -344,7 +344,7 @@ for (const host of hosts) {
|
|
|
344
344
|
test.describe('Review Purchase Simulation', () => {
|
|
345
345
|
test('should render purchase review in light mode', async ({ page }) => {
|
|
346
346
|
await page.goto(
|
|
347
|
-
|
|
347
|
+
createInspectorUrl({ simulation: 'review-purchase', theme: 'light', host })
|
|
348
348
|
);
|
|
349
349
|
|
|
350
350
|
await page.waitForLoadState('networkidle');
|
|
@@ -354,7 +354,7 @@ for (const host of hosts) {
|
|
|
354
354
|
});
|
|
355
355
|
|
|
356
356
|
test('should render purchase review in dark mode', async ({ page }) => {
|
|
357
|
-
await page.goto(
|
|
357
|
+
await page.goto(createInspectorUrl({ simulation: 'review-purchase', theme: 'dark', host }));
|
|
358
358
|
|
|
359
359
|
await page.waitForLoadState('networkidle');
|
|
360
360
|
|
|
@@ -364,7 +364,7 @@ for (const host of hosts) {
|
|
|
364
364
|
|
|
365
365
|
test('should show loading then result when placing order', async ({ page }) => {
|
|
366
366
|
await page.goto(
|
|
367
|
-
|
|
367
|
+
createInspectorUrl({
|
|
368
368
|
simulation: 'review-purchase',
|
|
369
369
|
theme: 'light',
|
|
370
370
|
host,
|
|
@@ -385,7 +385,7 @@ for (const host of hosts) {
|
|
|
385
385
|
test.describe('Server Tool Simulation via serverTools field', () => {
|
|
386
386
|
test('should confirm review-diff and show server success', async ({ page }) => {
|
|
387
387
|
await page.goto(
|
|
388
|
-
|
|
388
|
+
createInspectorUrl({
|
|
389
389
|
simulation: 'review-diff',
|
|
390
390
|
theme: 'dark',
|
|
391
391
|
host,
|
|
@@ -404,7 +404,7 @@ for (const host of hosts) {
|
|
|
404
404
|
|
|
405
405
|
test('should cancel review-diff and show server cancelled', async ({ page }) => {
|
|
406
406
|
await page.goto(
|
|
407
|
-
|
|
407
|
+
createInspectorUrl({
|
|
408
408
|
simulation: 'review-diff',
|
|
409
409
|
theme: 'dark',
|
|
410
410
|
host,
|