sunpeak 0.14.3 → 0.15.1

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.
Files changed (128) hide show
  1. package/README.md +32 -28
  2. package/bin/commands/build.mjs +2 -1
  3. package/bin/commands/dev.mjs +72 -2
  4. package/dist/chatgpt/{conversation.d.ts → chatgpt-conversation.d.ts} +1 -1
  5. package/dist/chatgpt/chatgpt-host.d.ts +1 -0
  6. package/dist/chatgpt/globals.css +618 -6156
  7. package/dist/chatgpt/index.cjs +11 -8
  8. package/dist/chatgpt/index.cjs.map +1 -1
  9. package/dist/chatgpt/index.d.ts +10 -32
  10. package/dist/chatgpt/index.js +15 -12
  11. package/dist/chatgpt/index.js.map +1 -1
  12. package/dist/claude/claude-conversation.d.ts +23 -0
  13. package/dist/claude/claude-host.d.ts +1 -0
  14. package/dist/claude/index.cjs +6 -0
  15. package/dist/claude/index.cjs.map +1 -0
  16. package/dist/claude/index.d.ts +1 -0
  17. package/dist/claude/index.js +6 -0
  18. package/dist/claude/index.js.map +1 -0
  19. package/dist/claude-host-C7KPfOM8.cjs +284 -0
  20. package/dist/claude-host-C7KPfOM8.cjs.map +1 -0
  21. package/dist/claude-host-CaD7ptbt.js +283 -0
  22. package/dist/claude-host-CaD7ptbt.js.map +1 -0
  23. package/dist/{discovery-COZUnY6a.js → discovery-DzV3HLXs.js} +5 -5
  24. package/dist/{discovery-COZUnY6a.js.map → discovery-DzV3HLXs.js.map} +1 -1
  25. package/dist/hooks/index.d.ts +4 -0
  26. package/dist/hooks/use-app-tools.d.ts +44 -0
  27. package/dist/hooks/use-update-model-context.d.ts +29 -0
  28. package/dist/index-BKrboRah.js +44 -0
  29. package/dist/index-BKrboRah.js.map +1 -0
  30. package/dist/index-BSKuY-oH.cjs +527 -0
  31. package/dist/index-BSKuY-oH.cjs.map +1 -0
  32. package/dist/index-CiqvXo8n.js +512 -0
  33. package/dist/index-CiqvXo8n.js.map +1 -0
  34. package/dist/index-Dr-L0Nb3.cjs +43 -0
  35. package/dist/index-Dr-L0Nb3.cjs.map +1 -0
  36. package/dist/index.cjs +1705 -1647
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.ts +2 -1
  39. package/dist/index.js +2732 -2675
  40. package/dist/index.js.map +1 -1
  41. package/dist/lib/default-style-variables.d.ts +2 -0
  42. package/dist/lib/discovery-cli.js +1 -1
  43. package/dist/mcp/index.cjs +86 -27
  44. package/dist/mcp/index.cjs.map +1 -1
  45. package/dist/mcp/index.d.ts +3 -1
  46. package/dist/mcp/index.js +85 -26
  47. package/dist/mcp/index.js.map +1 -1
  48. package/dist/mcp/server.d.ts +4 -3
  49. package/dist/mcp/types.d.ts +11 -0
  50. package/dist/platform/chatgpt/index.cjs +1 -1
  51. package/dist/platform/chatgpt/index.js +1 -1
  52. package/dist/platform/index.cjs +3 -0
  53. package/dist/platform/index.cjs.map +1 -1
  54. package/dist/platform/index.d.ts +3 -1
  55. package/dist/platform/index.js +3 -0
  56. package/dist/platform/index.js.map +1 -1
  57. package/dist/{protocol-BQCnIrc9.js → protocol-DFbsCx7E.js} +29 -29
  58. package/dist/{protocol-BQCnIrc9.js.map → protocol-DFbsCx7E.js.map} +1 -1
  59. package/dist/simulator/host-styles.d.ts +5 -0
  60. package/dist/simulator/hosts.d.ts +73 -0
  61. package/dist/{chatgpt → simulator}/iframe-resource.d.ts +27 -3
  62. package/dist/simulator/index.cjs +40 -0
  63. package/dist/simulator/index.cjs.map +1 -0
  64. package/dist/simulator/index.d.ts +18 -0
  65. package/dist/simulator/index.js +40 -0
  66. package/dist/simulator/index.js.map +1 -0
  67. package/dist/{chatgpt → simulator}/mcp-app-host.d.ts +8 -1
  68. package/dist/simulator/mock-openai-runtime.d.ts +20 -0
  69. package/dist/{chatgpt → simulator}/simulator-url.d.ts +8 -1
  70. package/dist/simulator/simulator.d.ts +12 -0
  71. package/dist/{chatgpt → simulator}/theme-provider.d.ts +3 -1
  72. package/dist/simulator/use-simulator-state.d.ts +91 -0
  73. package/dist/simulator-BqZmzFVR.cjs +8214 -0
  74. package/dist/simulator-BqZmzFVR.cjs.map +1 -0
  75. package/dist/simulator-CMgCGNuD.js +8199 -0
  76. package/dist/simulator-CMgCGNuD.js.map +1 -0
  77. package/dist/simulator-url-BQ-7SMht.js +335 -0
  78. package/dist/simulator-url-BQ-7SMht.js.map +1 -0
  79. package/dist/simulator-url-uNqOCaPJ.cjs +334 -0
  80. package/dist/simulator-url-uNqOCaPJ.cjs.map +1 -0
  81. package/dist/style.css +558 -6143
  82. package/dist/types/runtime.d.ts +1 -1
  83. package/dist/{use-app-D7kRAPSG.cjs → use-app-BnoSPiUT.cjs} +2 -1
  84. package/dist/{use-app-D7kRAPSG.cjs.map → use-app-BnoSPiUT.cjs.map} +1 -1
  85. package/dist/{use-app-Dvr4LKs2.js → use-app-D_TeaMFG.js} +4 -3
  86. package/dist/{use-app-Dvr4LKs2.js.map → use-app-D_TeaMFG.js.map} +1 -1
  87. package/package.json +18 -3
  88. package/template/.sunpeak/dev.tsx +4 -4
  89. package/template/.sunpeak/resource-loader.html +1 -1
  90. package/template/node_modules/.bin/nodemon +2 -2
  91. package/template/node_modules/.bin/playwright +2 -2
  92. package/template/node_modules/.bin/sunpeak +2 -2
  93. package/template/node_modules/.bin/tsc +2 -2
  94. package/template/node_modules/.bin/tsserver +2 -2
  95. package/template/node_modules/.bin/tsx +2 -2
  96. package/template/node_modules/.bin/vite +2 -2
  97. package/template/src/components/avatar.tsx +4 -1
  98. package/template/src/components/button.tsx +17 -20
  99. package/template/src/resources/albums/albums-resource.tsx +2 -3
  100. package/template/src/resources/albums/components/album-card.tsx +4 -2
  101. package/template/src/resources/albums/components/film-strip.test.tsx +2 -2
  102. package/template/src/resources/albums/components/film-strip.tsx +2 -2
  103. package/template/src/resources/albums/components/fullscreen-viewer.tsx +7 -5
  104. package/template/src/resources/carousel/carousel-resource.tsx +2 -3
  105. package/template/src/resources/carousel/components/card.test.tsx +3 -2
  106. package/template/src/resources/carousel/components/card.tsx +8 -4
  107. package/template/src/resources/map/components/map-view.tsx +1 -1
  108. package/template/src/resources/map/components/map.tsx +1 -1
  109. package/template/src/resources/map/components/place-card.tsx +8 -4
  110. package/template/src/resources/map/components/place-carousel.tsx +1 -1
  111. package/template/src/resources/map/components/place-inspector.tsx +15 -7
  112. package/template/src/resources/map/components/place-list.tsx +7 -4
  113. package/template/src/resources/map/map-resource.tsx +0 -2
  114. package/template/src/resources/review/review-resource.tsx +61 -27
  115. package/template/tests/e2e/albums.spec.ts +118 -102
  116. package/template/tests/e2e/carousel.spec.ts +103 -100
  117. package/template/tests/e2e/map.spec.ts +220 -181
  118. package/template/tests/e2e/review.spec.ts +224 -198
  119. package/dist/_commonjsHelpers-Bc2YnDe1.cjs +0 -8
  120. package/dist/_commonjsHelpers-Bc2YnDe1.cjs.map +0 -1
  121. package/dist/_commonjsHelpers-DWwsNxpa.js +0 -9
  122. package/dist/_commonjsHelpers-DWwsNxpa.js.map +0 -1
  123. package/dist/index-CJ3jfcjj.js +0 -15131
  124. package/dist/index-CJ3jfcjj.js.map +0 -1
  125. package/dist/index-Cdeg96So.cjs +0 -15147
  126. package/dist/index-Cdeg96So.cjs.map +0 -1
  127. /package/dist/{chatgpt → simulator}/simple-sidebar.d.ts +0 -0
  128. /package/dist/{chatgpt/chatgpt-simulator-types.d.ts → simulator/simulator-types.d.ts} +0 -0
@@ -1,245 +1,271 @@
1
1
  import { test, expect } from '@playwright/test';
2
2
  import { createSimulatorUrl } from 'sunpeak/chatgpt';
3
3
 
4
- test.describe('Review Resource', () => {
5
- test.describe('Light Mode', () => {
6
- test('should render review title with correct styles', async ({ page }) => {
7
- await page.goto(createSimulatorUrl({ simulation: 'review-diff', theme: 'light' }));
8
-
9
- const iframe = page.frameLocator('iframe');
10
- const title = iframe.locator('h1:has-text("Refactor Authentication Module")');
11
- await expect(title).toBeVisible();
12
-
13
- const styles = await title.evaluate((el) => {
14
- const computed = window.getComputedStyle(el);
15
- return {
16
- fontWeight: computed.fontWeight,
17
- };
4
+ const hosts = ['chatgpt', 'claude'] as const;
5
+
6
+ for (const host of hosts) {
7
+ test.describe(`Review Resource [${host}]`, () => {
8
+ test.describe('Light Mode', () => {
9
+ test('should render review title with correct styles', async ({ page }) => {
10
+ await page.goto(createSimulatorUrl({ simulation: 'review-diff', theme: 'light', host }));
11
+
12
+ const iframe = page.frameLocator('iframe');
13
+ const title = iframe.locator('h1:has-text("Refactor Authentication Module")');
14
+ await expect(title).toBeVisible();
15
+
16
+ const styles = await title.evaluate((el) => {
17
+ const computed = window.getComputedStyle(el);
18
+ return {
19
+ fontWeight: computed.fontWeight,
20
+ };
21
+ });
22
+
23
+ // Should render semibold (600)
24
+ expect(parseInt(styles.fontWeight)).toBeGreaterThanOrEqual(600);
18
25
  });
19
26
 
20
- // Should render semibold (600)
21
- expect(parseInt(styles.fontWeight)).toBeGreaterThanOrEqual(600);
22
- });
27
+ test('should render change items with type-specific styling', async ({ page }) => {
28
+ await page.goto(createSimulatorUrl({ simulation: 'review-diff', theme: 'light', host }));
23
29
 
24
- test('should render change items with type-specific styling', async ({ page }) => {
25
- await page.goto(createSimulatorUrl({ simulation: 'review-diff', theme: 'light' }));
30
+ const iframe = page.frameLocator('iframe');
31
+ const changeItem = iframe.locator('li').first();
32
+ await expect(changeItem).toBeVisible();
26
33
 
27
- const iframe = page.frameLocator('iframe');
28
- const changeItem = iframe.locator('li').first();
29
- await expect(changeItem).toBeVisible();
34
+ const styles = await changeItem.evaluate((el) => {
35
+ const computed = window.getComputedStyle(el);
36
+ return {
37
+ borderRadius: computed.borderRadius,
38
+ backgroundColor: computed.backgroundColor,
39
+ };
40
+ });
30
41
 
31
- const styles = await changeItem.evaluate((el) => {
32
- const computed = window.getComputedStyle(el);
33
- return {
34
- borderRadius: computed.borderRadius,
35
- backgroundColor: computed.backgroundColor,
36
- };
42
+ // Background should be set (one of the type colors)
43
+ expect(styles.backgroundColor).toBeTruthy();
44
+ expect(styles.backgroundColor).not.toBe('rgba(0, 0, 0, 0)');
37
45
  });
38
46
 
39
- // Background should be set (one of the type colors)
40
- expect(styles.backgroundColor).toBeTruthy();
41
- expect(styles.backgroundColor).not.toBe('rgba(0, 0, 0, 0)');
42
- });
43
-
44
- test('should have interactive apply and cancel buttons', async ({ page }) => {
45
- await page.goto(createSimulatorUrl({ simulation: 'review-diff', theme: 'light' }));
46
-
47
- const iframe = page.frameLocator('iframe');
48
-
49
- // Find the Apply Changes button (based on simulation data)
50
- const applyButton = iframe.locator('button:has-text("Apply Changes")');
51
- await expect(applyButton).toBeVisible();
52
-
53
- const applyStyles = await applyButton.evaluate((el) => {
54
- const computed = window.getComputedStyle(el);
55
- return {
56
- cursor: computed.cursor,
57
- };
47
+ test('should have interactive apply and cancel buttons', async ({ page }) => {
48
+ await page.goto(createSimulatorUrl({ simulation: 'review-diff', theme: 'light', host }));
49
+
50
+ const iframe = page.frameLocator('iframe');
51
+
52
+ // Find the Apply Changes button (based on simulation data)
53
+ const applyButton = iframe.locator('button:has-text("Apply Changes")');
54
+ await expect(applyButton).toBeVisible();
55
+
56
+ const applyStyles = await applyButton.evaluate((el) => {
57
+ const computed = window.getComputedStyle(el);
58
+ return {
59
+ cursor: computed.cursor,
60
+ };
61
+ });
62
+ expect(applyStyles.cursor).toBe('pointer');
63
+
64
+ // Find the Cancel button
65
+ const cancelButton = iframe.locator('button:has-text("Cancel")');
66
+ await expect(cancelButton).toBeVisible();
67
+
68
+ const cancelStyles = await cancelButton.evaluate((el) => {
69
+ const computed = window.getComputedStyle(el);
70
+ return {
71
+ cursor: computed.cursor,
72
+ };
73
+ });
74
+ expect(cancelStyles.cursor).toBe('pointer');
58
75
  });
59
- expect(applyStyles.cursor).toBe('pointer');
60
-
61
- // Find the Cancel button
62
- const cancelButton = iframe.locator('button:has-text("Cancel")');
63
- await expect(cancelButton).toBeVisible();
64
76
 
65
- const cancelStyles = await cancelButton.evaluate((el) => {
66
- const computed = window.getComputedStyle(el);
67
- return {
68
- cursor: computed.cursor,
69
- };
77
+ test('should have expand fullscreen button in inline mode', async ({ page }) => {
78
+ await page.goto(
79
+ createSimulatorUrl({
80
+ simulation: 'review-diff',
81
+ theme: 'light',
82
+ displayMode: 'inline',
83
+ host,
84
+ })
85
+ );
86
+
87
+ const iframe = page.frameLocator('iframe');
88
+ const expandButton = iframe.locator('button[aria-label="Enter fullscreen"]');
89
+ await expect(expandButton).toBeVisible();
90
+
91
+ const styles = await expandButton.evaluate((el) => {
92
+ const computed = window.getComputedStyle(el);
93
+ return {
94
+ cursor: computed.cursor,
95
+ };
96
+ });
97
+
98
+ expect(styles.cursor).toBe('pointer');
70
99
  });
71
- expect(cancelStyles.cursor).toBe('pointer');
72
100
  });
73
101
 
74
- test('should have expand fullscreen button in inline mode', async ({ page }) => {
75
- await page.goto(
76
- createSimulatorUrl({ simulation: 'review-diff', theme: 'light', displayMode: 'inline' })
77
- );
78
-
79
- const iframe = page.frameLocator('iframe');
80
- const expandButton = iframe.locator('button[aria-label="Enter fullscreen"]');
81
- await expect(expandButton).toBeVisible();
102
+ test.describe('Dark Mode', () => {
103
+ test('should render review title with correct styles', async ({ page }) => {
104
+ await page.goto(createSimulatorUrl({ simulation: 'review-diff', theme: 'dark', host }));
82
105
 
83
- const styles = await expandButton.evaluate((el) => {
84
- const computed = window.getComputedStyle(el);
85
- return {
86
- cursor: computed.cursor,
87
- };
106
+ const iframe = page.frameLocator('iframe');
107
+ const title = iframe.locator('h1:has-text("Refactor Authentication Module")');
108
+ await expect(title).toBeVisible();
88
109
  });
89
110
 
90
- expect(styles.cursor).toBe('pointer');
91
- });
92
- });
111
+ test('should have appropriate text colors for dark mode', async ({ page }) => {
112
+ await page.goto(createSimulatorUrl({ simulation: 'review-diff', theme: 'dark', host }));
93
113
 
94
- test.describe('Dark Mode', () => {
95
- test('should render review title with correct styles', async ({ page }) => {
96
- await page.goto(createSimulatorUrl({ simulation: 'review-diff', theme: 'dark' }));
114
+ const iframe = page.frameLocator('iframe');
115
+ const title = iframe.locator('h1').first();
116
+ await expect(title).toBeVisible();
97
117
 
98
- const iframe = page.frameLocator('iframe');
99
- const title = iframe.locator('h1:has-text("Refactor Authentication Module")');
100
- await expect(title).toBeVisible();
101
- });
102
-
103
- test('should have appropriate text colors for dark mode', async ({ page }) => {
104
- await page.goto(createSimulatorUrl({ simulation: 'review-diff', theme: 'dark' }));
105
-
106
- const iframe = page.frameLocator('iframe');
107
- const title = iframe.locator('h1.text-primary').first();
108
- await expect(title).toBeVisible();
118
+ const styles = await title.evaluate((el) => {
119
+ const computed = window.getComputedStyle(el);
120
+ return {
121
+ color: computed.color,
122
+ };
123
+ });
109
124
 
110
- const styles = await title.evaluate((el) => {
111
- const computed = window.getComputedStyle(el);
112
- return {
113
- color: computed.color,
114
- };
125
+ // In dark mode, text color should be light
126
+ expect(styles.color).toBeTruthy();
115
127
  });
116
128
 
117
- // In dark mode, text color should be light
118
- expect(styles.color).toBeTruthy();
119
- });
120
-
121
- test('should render change items in dark mode', async ({ page }) => {
122
- await page.goto(createSimulatorUrl({ simulation: 'review-diff', theme: 'dark' }));
129
+ test('should render change items in dark mode', async ({ page }) => {
130
+ await page.goto(createSimulatorUrl({ simulation: 'review-diff', theme: 'dark', host }));
123
131
 
124
- const iframe = page.frameLocator('iframe');
125
- const changeItem = iframe.locator('li').first();
126
- await expect(changeItem).toBeVisible();
127
- });
128
-
129
- test('should load without console errors', async ({ page }) => {
130
- const errors: string[] = [];
131
- page.on('console', (msg) => {
132
- if (msg.type() === 'error') {
133
- errors.push(msg.text());
134
- }
132
+ const iframe = page.frameLocator('iframe');
133
+ const changeItem = iframe.locator('li').first();
134
+ await expect(changeItem).toBeVisible();
135
135
  });
136
136
 
137
- await page.goto(createSimulatorUrl({ simulation: 'review-diff', theme: 'dark' }));
138
-
139
- // Wait for iframe content to render
140
- const iframe = page.frameLocator('iframe');
141
- await expect(iframe.locator('h1').first()).toBeVisible();
142
-
143
- // Filter out expected iframe/MCP handshake errors
144
- const unexpectedErrors = errors.filter(
145
- (e) =>
146
- !e.includes('[IframeResource]') &&
147
- !e.includes('mcp') &&
148
- !e.includes('PostMessage') &&
149
- !e.includes('connect')
150
- );
151
- expect(unexpectedErrors).toHaveLength(0);
152
- });
153
- });
154
-
155
- test.describe('Fullscreen Mode', () => {
156
- test('should not show fullscreen button when already in fullscreen', async ({ page }) => {
157
- await page.goto(
158
- createSimulatorUrl({ simulation: 'review-diff', theme: 'light', displayMode: 'fullscreen' })
159
- );
160
-
161
- const iframe = page.frameLocator('iframe');
162
- // Wait for content to render first
163
- await expect(iframe.locator('h1').first()).toBeVisible();
164
-
165
- // The expand button should not be visible in fullscreen mode
166
- const expandButton = iframe.locator('button[aria-label="Enter fullscreen"]');
167
- await expect(expandButton).not.toBeVisible();
168
- });
169
-
170
- test('should render content correctly in fullscreen', async ({ page }) => {
171
- await page.goto(
172
- createSimulatorUrl({ simulation: 'review-diff', theme: 'dark', displayMode: 'fullscreen' })
173
- );
174
-
175
- // The root container should be present
176
- const root = page.locator('#root');
177
- await expect(root).not.toBeEmpty();
178
-
179
- // Title should be visible inside the iframe
180
- const iframe = page.frameLocator('iframe');
181
- const title = iframe.locator('h1');
182
- await expect(title).toBeVisible();
137
+ test('should load without console errors', async ({ page }) => {
138
+ const errors: string[] = [];
139
+ page.on('console', (msg) => {
140
+ if (msg.type() === 'error') {
141
+ errors.push(msg.text());
142
+ }
143
+ });
144
+
145
+ await page.goto(createSimulatorUrl({ simulation: 'review-diff', theme: 'dark', host }));
146
+
147
+ // Wait for iframe content to render
148
+ const iframe = page.frameLocator('iframe');
149
+ await expect(iframe.locator('h1').first()).toBeVisible();
150
+
151
+ // Filter out expected iframe/MCP handshake errors
152
+ const unexpectedErrors = errors.filter(
153
+ (e) =>
154
+ !e.includes('[IframeResource]') &&
155
+ !e.includes('mcp') &&
156
+ !e.includes('PostMessage') &&
157
+ !e.includes('connect')
158
+ );
159
+ expect(unexpectedErrors).toHaveLength(0);
160
+ });
183
161
  });
184
162
 
185
- test('should have scrollable content area in fullscreen', async ({ page }) => {
186
- await page.goto(
187
- createSimulatorUrl({ simulation: 'review-diff', theme: 'light', displayMode: 'fullscreen' })
188
- );
189
-
190
- const iframe = page.frameLocator('iframe');
191
- const contentArea = iframe.locator('.overflow-y-auto').first();
192
- await expect(contentArea).toBeVisible();
163
+ test.describe('Fullscreen Mode', () => {
164
+ test('should not show fullscreen button when already in fullscreen', async ({ page }) => {
165
+ await page.goto(
166
+ createSimulatorUrl({
167
+ simulation: 'review-diff',
168
+ theme: 'light',
169
+ displayMode: 'fullscreen',
170
+ host,
171
+ })
172
+ );
173
+
174
+ const iframe = page.frameLocator('iframe');
175
+ // Wait for content to render first
176
+ await expect(iframe.locator('h1').first()).toBeVisible();
177
+
178
+ // The expand button should not be visible in fullscreen mode
179
+ const expandButton = iframe.locator('button[aria-label="Enter fullscreen"]');
180
+ await expect(expandButton).not.toBeVisible();
181
+ });
193
182
 
194
- const styles = await contentArea.evaluate((el) => {
195
- const computed = window.getComputedStyle(el);
196
- return {
197
- overflowY: computed.overflowY,
198
- };
183
+ test('should render content correctly in fullscreen', async ({ page }) => {
184
+ await page.goto(
185
+ createSimulatorUrl({
186
+ simulation: 'review-diff',
187
+ theme: 'dark',
188
+ displayMode: 'fullscreen',
189
+ host,
190
+ })
191
+ );
192
+
193
+ // The root container should be present
194
+ const root = page.locator('#root');
195
+ await expect(root).not.toBeEmpty();
196
+
197
+ // Title should be visible inside the iframe
198
+ const iframe = page.frameLocator('iframe');
199
+ const title = iframe.locator('h1');
200
+ await expect(title).toBeVisible();
199
201
  });
200
202
 
201
- expect(styles.overflowY).toBe('auto');
203
+ test('should have scrollable content area in fullscreen', async ({ page }) => {
204
+ await page.goto(
205
+ createSimulatorUrl({
206
+ simulation: 'review-diff',
207
+ theme: 'light',
208
+ displayMode: 'fullscreen',
209
+ host,
210
+ })
211
+ );
212
+
213
+ const iframe = page.frameLocator('iframe');
214
+ const contentArea = iframe.locator('.overflow-y-auto').first();
215
+ await expect(contentArea).toBeVisible();
216
+
217
+ const styles = await contentArea.evaluate((el) => {
218
+ const computed = window.getComputedStyle(el);
219
+ return {
220
+ overflowY: computed.overflowY,
221
+ };
222
+ });
223
+
224
+ expect(styles.overflowY).toBe('auto');
225
+ });
202
226
  });
203
- });
204
227
 
205
- test.describe('Review Post Simulation', () => {
206
- test('should render post review in light mode', async ({ page }) => {
207
- await page.goto(createSimulatorUrl({ simulation: 'review-post', theme: 'light' }));
228
+ test.describe('Review Post Simulation', () => {
229
+ test('should render post review in light mode', async ({ page }) => {
230
+ await page.goto(createSimulatorUrl({ simulation: 'review-post', theme: 'light', host }));
208
231
 
209
- await page.waitForLoadState('networkidle');
232
+ await page.waitForLoadState('networkidle');
210
233
 
211
- // Should render the review content
212
- const root = page.locator('#root');
213
- await expect(root).not.toBeEmpty();
214
- });
234
+ // Should render the review content
235
+ const root = page.locator('#root');
236
+ await expect(root).not.toBeEmpty();
237
+ });
215
238
 
216
- test('should render post review in dark mode', async ({ page }) => {
217
- await page.goto(createSimulatorUrl({ simulation: 'review-post', theme: 'dark' }));
239
+ test('should render post review in dark mode', async ({ page }) => {
240
+ await page.goto(createSimulatorUrl({ simulation: 'review-post', theme: 'dark', host }));
218
241
 
219
- await page.waitForLoadState('networkidle');
242
+ await page.waitForLoadState('networkidle');
220
243
 
221
- const root = page.locator('#root');
222
- await expect(root).not.toBeEmpty();
244
+ const root = page.locator('#root');
245
+ await expect(root).not.toBeEmpty();
246
+ });
223
247
  });
224
- });
225
248
 
226
- test.describe('Review Purchase Simulation', () => {
227
- test('should render purchase review in light mode', async ({ page }) => {
228
- await page.goto(createSimulatorUrl({ simulation: 'review-purchase', theme: 'light' }));
249
+ test.describe('Review Purchase Simulation', () => {
250
+ test('should render purchase review in light mode', async ({ page }) => {
251
+ await page.goto(
252
+ createSimulatorUrl({ simulation: 'review-purchase', theme: 'light', host })
253
+ );
229
254
 
230
- await page.waitForLoadState('networkidle');
255
+ await page.waitForLoadState('networkidle');
231
256
 
232
- const root = page.locator('#root');
233
- await expect(root).not.toBeEmpty();
234
- });
257
+ const root = page.locator('#root');
258
+ await expect(root).not.toBeEmpty();
259
+ });
235
260
 
236
- test('should render purchase review in dark mode', async ({ page }) => {
237
- await page.goto(createSimulatorUrl({ simulation: 'review-purchase', theme: 'dark' }));
261
+ test('should render purchase review in dark mode', async ({ page }) => {
262
+ await page.goto(createSimulatorUrl({ simulation: 'review-purchase', theme: 'dark', host }));
238
263
 
239
- await page.waitForLoadState('networkidle');
264
+ await page.waitForLoadState('networkidle');
240
265
 
241
- const root = page.locator('#root');
242
- await expect(root).not.toBeEmpty();
266
+ const root = page.locator('#root');
267
+ await expect(root).not.toBeEmpty();
268
+ });
243
269
  });
244
270
  });
245
- });
271
+ }
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
3
- function getDefaultExportFromCjs(x) {
4
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
5
- }
6
- exports.commonjsGlobal = commonjsGlobal;
7
- exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
8
- //# sourceMappingURL=_commonjsHelpers-Bc2YnDe1.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_commonjsHelpers-Bc2YnDe1.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,9 +0,0 @@
1
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
2
- function getDefaultExportFromCjs(x) {
3
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
4
- }
5
- export {
6
- commonjsGlobal as c,
7
- getDefaultExportFromCjs as g
8
- };
9
- //# sourceMappingURL=_commonjsHelpers-DWwsNxpa.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_commonjsHelpers-DWwsNxpa.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}