fix: support setting visibility on initial chat creation (#975)

This commit is contained in:
Jeremy 2025-05-01 17:47:48 -07:00 committed by GitHub
parent a3221fbcdc
commit 575c12503c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 158 additions and 32 deletions

View file

@ -115,6 +115,23 @@ export class ChatPage {
expect(await this.getSelectedModel()).toBe(chatModel.name);
}
public async getSelectedVisibility() {
const visibilityId = await this.page
.getByTestId('visibility-selector')
.innerText();
return visibilityId;
}
public async chooseVisibilityFromSelector(
chatVisibility: 'public' | 'private',
) {
await this.page.getByTestId('visibility-selector').click();
await this.page
.getByTestId(`visibility-selector-item-${chatVisibility}`)
.click();
expect(await this.getSelectedVisibility()).toBe(chatVisibility);
}
async getRecentAssistantMessage() {
const messageElements = await this.page
.getByTestId('message-assistant')