🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
Added E2Es for signup (#390)
FrankenDeba1c35e8577d04
diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.ymlindex 5ffc2db5ef..2de8189859 100644--- a/.github/workflows/prettier.yml+++ b/.github/workflows/prettier.yml@@ -13,9 +13,6 @@ jobs:steps:- name: Checkoutuses: actions/checkout@v3- with:- # Make sure the actual branch is checked out when running on pull requests- ref: ${{ github.head_ref }}- uses: actions/setup-node@v3with:node-version: 18@@ -25,5 +22,6 @@ jobs:- name: Prettify codeuses: creyD/[email protected]with:- prettier_options: --write ./src *.{ts,js} --ignore-path .gitignore- commit_message: "Applied prettier formatting"+ dry: ${{ github.event.pull_request.head.repo.full_name != 'langfuse/langfuse' }}+ prettier_options: ${{ github.event.pull_request.head.repo.full_name != 'langfuse/langfuse' && '--check' || '--write' }} ./src *.{ts,js} --ignore-path .gitignore+ commit_message: "Applied prettier formatting" # only applies to langfuse/langfuse and not to forksdiff --git a/src/__e2e__/auth.spec.ts b/src/__e2e__/auth.spec.tsindex d796e086cd..b26a53622d 100644--- a/src/__e2e__/auth.spec.ts+++ b/src/__e2e__/auth.spec.ts@@ -25,3 +25,34 @@ test("should redirect to home if signed in", async ({ page }) => {page.url(),);});++test("Successfully sign up & able to go to homepage", async ({ page }) => {+ await page.goto("auth/sign-up");+ await page.fill('input[name="name"]', "demo lang");+ await page.fill('input[name="email"]', randomEmailAddress());+ await page.fill('input[type="password"]', "password2");+ await page.click('button[type="submit"]');+ await page.waitForTimeout(2000);+ // see get started page+ await expect(page).toHaveURL("/?getStarted=1");+});++test("Signup validation", async ({ page }) => {+ await page.goto("auth/sign-up");+ await page.fill('input[name="email"]', "notanemail");+ await page.fill('input[type="password"]', "pass3");+ await page.click('button[type="submit"]');+ await page.waitForTimeout(2000);+ await expect(page.getByText("Invalid email")).toBeVisible();+ await expect(+ page.getByText("Password must be at least 8 characters long"),+ ).toBeVisible();+ await page.click('button[type="submit"]');+ await page.waitForTimeout(2000);+ // don't see get started page+ await expect(page).not.toHaveURL("/?getStarted=1");+});++// random email address to be used in tests+const randomEmailAddress = () =>+ Math.random().toString(36).substring(2, 11) + "@example.com";