Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions e2e/Example.spec.ts

This file was deleted.

37 changes: 37 additions & 0 deletions e2e/basic-functionalities.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// @ts-check
import { test, expect } from '@playwright/test'

test('chat', async ({ page }) => {
var sendButton = "xpath=/html//div[@id='app']/div/div[3]//div[@class='relative w-full']/div/button"

await page.goto('http://localhost:3000')
await page.getByText('Home').click()
await page.getByPlaceholder('Ask the Cheshire Cat...').fill('who are you?')
await page.locator(sendButton).click()
page.getByText('who are you?')
})

test('menu navigation', async ({ page, context }) => {
var settings = "xpath=/html//div[@id='app']//div[@class='navbar-center']/ul//a[@href='/settings']"
var micButton = "xpath=/html//div[@id='app']/div/div[3]/div[2]/div/button"

await page.goto('http://localhost:3000')

await page.getByText('Home').click()
page.locator(micButton)

await page.getByText('Memory').click()
page.getByText('Recall text')

await page.getByText('Plugins').click()
page.getByText('Search for a plugin')

await page.locator(settings).click()
page.getByText('Set up your Cat')

const pagePromise = context.waitForEvent('page');
await page.getByText('Docs').click()
const newPage = await pagePromise;
await newPage.waitForLoadState();
await newPage.waitForURL('https://cheshire-cat-ai.github.io/docs/')
})
8 changes: 4 additions & 4 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ export default defineConfig({
use: { ...devices['Desktop Chrome'] },
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
// {
// name: 'firefox',
// use: { ...devices['Desktop Firefox'] },
// },

{
name: 'webkit',
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": [
"env.d.ts",
"src/**/*",
"src/**/*.vue",
".eslintrc.json",
"components.d.ts",
"auto-imports.d.ts",
"globals.d.ts",
"unit/**/*.test.ts",
"e2e/**/*.spec.ts"
"e2e/**/*.spec.ts"
],
"compilerOptions": {
"target": "ESNext",
Expand Down