The Unified and Autonomous Development Platform
test: Update webhook branding checks and document SSH setup
Robin Shene56b45aa0c6d
diff --git a/e2e-test/README.md b/e2e-test/README.mdindex 0fac0d32db..1b6a85f955 100644--- a/e2e-test/README.md+++ b/e2e-test/README.md@@ -81,6 +81,12 @@ by default). Its SSH fixture waits up to 60 seconds for a TCP connection to thehost and port in that URL, after HTTP readiness. This also supports custom SSHports without making other tests depend on SSH.+For an existing sandbox whose Server URL uses standard HTTP/HTTPS ports, the+default advertised SSH URL uses port 22. If OneDev actually listens on port 6611,+set **Administration → System Settings → SSH Root URL** explicitly, for example+`ssh://test.onedev.io:6611`. Otherwise these tests can reach the host's SSH service+instead of OneDev, even when the HTTP tests use `127.0.0.1:6610`.+It tests Ed25519 and 3072-bit RSA keys, with separate RSA casesforcing SHA-256 and SHA-512 signatures. Each case generates a temporary key,checks that cloning fails before registration, registers the key for a test userdiff --git a/e2e-test/tests/product-branding.spec.js b/e2e-test/tests/product-branding.spec.jsindex 141397eb31..91a391ac28 100644--- a/e2e-test/tests/product-branding.spec.js+++ b/e2e-test/tests/product-branding.spec.js@@ -53,10 +53,14 @@ test.describe('product branding', () => {await page.locator('.web-hooks a.btn-primary').click();const editor = page.locator('form.webhook-edit');await expect(editor).toBeVisible();- const description = language === 'zh'- ? `此密钥允许您确保发送到 payload URL 的 POST 请求来自 ${productName}。设置密钥后,您将在 webhook POST 请求中收到 X-OneDev-Signature 头`- : `The secret which allows you to ensure that POST requests sent to the payload URL are from ${productName}. When you set a secret you'll receive the X-OneDev-Signature header in the webhook POST request`;- await expect(editor.getByText(description, { exact: true })).toBeVisible();+ const secret = editor.locator('.property-secret');+ await expect(secret.locator('label')).toContainText(language === 'zh' ? '密钥' : 'Secret');+ const description = secret.locator('.editable-description');+ await expect(description).toBeVisible();+ // Branding and protocol identifiers must survive translation or its English fallback.+ for (const text of [productName, 'X-OneDev-Signature', 'HMAC-SHA256', 'UTF-8']) {+ await expect(description).toContainText(text);+ }// Opening the editor exercises Ajax rendering without saving a webhook.await editor.locator('.modal-header button.close').click();await expect(editor).toHaveCount(0);