Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

870 B
Raw Blame
import type { DifyWorld } from '../../support/world.ts'
import { When } from '@cucumber/cucumber'
import { adminCredentials } from '../../../fixtures/auth.ts'

When('I open the sign-in page', async function (this: DifyWorld) {
  await this.getPage().goto('/signin')
})

When(
  'I open the sign-in page with redirect target {string}',
  async function (this: DifyWorld, redirectTarget: string) {
    const searchParams = new URLSearchParams({ redirect_url: redirectTarget })

    await this.getPage().goto(`/signin?${searchParams}`)
  },
)

When('I sign in as the default E2E admin', async function (this: DifyWorld) {
  const page = this.getPage()

  await page.getByLabel('Email address').fill(adminCredentials.email)
  await page.getByLabel('Password', { exact: true }).fill(adminCredentials.password)
  await page.getByRole('button', { name: 'Sign in' }).click()
})