One word everywhere: ReplyPier in UI copy, package and image names, the replypier.site domains (app/api/docs/help), REPLYPIER_* settings and the --rp-* design tokens. - public widget API is window.ReplyPier with replypierId / replypierBaseUrl / replypierConfig / replypierToken, loader at webclient/replypier.min.js; both bundles rebuilt from source - NOTICE, llms.txt, CONTRIBUTING, HELP_CENTER_INFRA and the demo runtime config rewritten; the demo config ships no third-party keys - migration adds the ReplyPier managed model value to the AI model enum - local compose project, database, role, volume and Docker network carry the same name
26 lines
896 B
TypeScript
26 lines
896 B
TypeScript
import { test, expect } from '@e2e'
|
|
|
|
test.describe('widget JS API', () => {
|
|
test('the host page opens and closes the chat with window.ReplyPier @widget', async ({ widget }) => {
|
|
await widget.embed()
|
|
|
|
await widget.api('open')
|
|
await expect(widget.panel).toHaveClass(/\bactive\b/)
|
|
await widget.expectReady()
|
|
expect(await widget.api('isOpen')).toBe(true)
|
|
|
|
await widget.api('close')
|
|
await expect(widget.panel).not.toHaveClass(/\bactive\b/)
|
|
expect(await widget.api('isOpen')).toBe(false)
|
|
})
|
|
|
|
test('a site can hide the launcher and open the chat from its own button @widget', async ({ widget }) => {
|
|
await widget.embed({ config: { launcher: false }, withTriggerButton: true })
|
|
await expect(widget.launcher).toBeHidden()
|
|
|
|
await widget.hostChatButton.click()
|
|
await expect(widget.panel).toHaveClass(/\bactive\b/)
|
|
await widget.expectReady()
|
|
})
|
|
})
|