pinokiod 7.5.21 → 7.5.23

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.
@@ -136,4 +136,54 @@ test.describe('universal launcher smoke', () => {
136
136
  await deleteTask(request, tempPluginTask && tempPluginTask.id);
137
137
  }
138
138
  });
139
+
140
+ test('plugins page create and download buttons open plugin launcher on expected tabs', async ({ page }) => {
141
+ const pageErrors = [];
142
+ const consoleErrors = [];
143
+
144
+ page.on('pageerror', (error) => {
145
+ pageErrors.push(String(error));
146
+ });
147
+
148
+ page.on('console', (msg) => {
149
+ if (msg.type() === 'error') {
150
+ consoleErrors.push(msg.text());
151
+ }
152
+ });
153
+
154
+ await page.goto(`${BASE_URL}/plugins`, { waitUntil: 'networkidle' });
155
+
156
+ const createTrigger = page.locator('.task-shell-header [data-universal-launcher-open="create_plugin"]:not([data-universal-launcher-mode])').first();
157
+ await expect(createTrigger).toBeVisible();
158
+ await createTrigger.click();
159
+
160
+ const overlay = page.locator('.universal-launcher-overlay:not([hidden])').first();
161
+ await expect(overlay).toBeVisible();
162
+ await expect(overlay.locator('.universal-launcher-title')).toHaveText('Create Plugin');
163
+ await expect(overlay.locator('.universal-launcher-mode[data-mode="primary"]')).toHaveClass(/active/);
164
+ await expect(overlay.locator('.universal-launcher-section-prompt')).toBeVisible();
165
+ await expect(overlay.locator('.universal-launcher-section-tools')).toBeVisible();
166
+ await expect(overlay.locator('.universal-launcher-section-download')).toBeHidden();
167
+
168
+ await overlay.locator('.universal-launcher-close').click();
169
+ await expect(overlay).toBeHidden();
170
+
171
+ const downloadTrigger = page.locator('.task-shell-header [data-universal-launcher-open="create_plugin"][data-universal-launcher-mode="download"]').first();
172
+ await expect(downloadTrigger).toBeVisible();
173
+ await downloadTrigger.click();
174
+
175
+ await expect(overlay).toBeVisible();
176
+ await expect(overlay.locator('.universal-launcher-title')).toHaveText('Create Plugin');
177
+ await expect(overlay.locator('.universal-launcher-mode[data-mode="download"]')).toHaveClass(/active/);
178
+ await expect(overlay.locator('.universal-launcher-section-download')).toBeVisible();
179
+ await expect(overlay.locator('.universal-launcher-section-prompt')).toBeHidden();
180
+ await expect(overlay.locator('.universal-launcher-section-tools')).toBeHidden();
181
+ await expect(overlay.locator('.universal-launcher-download-input').first()).toBeFocused();
182
+
183
+ expect(pageErrors, `page errors: ${pageErrors.join('\n')}`).toEqual([]);
184
+ expect(
185
+ consoleErrors.filter((line) => !line.includes('favicon')),
186
+ `console errors: ${consoleErrors.join('\n')}`
187
+ ).toEqual([]);
188
+ });
139
189
  });