详细说明: - 修复了@n8n/config包的TypeScript配置错误 - 移除了不存在的jest-expect-message类型引用 - 清理了所有TypeScript构建缓存 - 更新了可行性分析文档,添加了技术实施方案 - 更新了Agent prompt文档 - 添加了会展策划工作流文档 - 包含了n8n-chinese-translation子项目 - 添加了exhibition-demo展示系统框架
58 lines
1.4 KiB
TypeScript
Executable File
58 lines
1.4 KiB
TypeScript
Executable File
import type { Locator, Page } from '@playwright/test';
|
|
|
|
import { BasePage } from './BasePage';
|
|
|
|
export class NpsSurveyPage extends BasePage {
|
|
constructor(page: Page) {
|
|
super(page);
|
|
}
|
|
|
|
getNpsSurveyModal(): Locator {
|
|
return this.page.getByTestId('nps-survey-modal');
|
|
}
|
|
|
|
getNpsSurveyRatings(): Locator {
|
|
return this.page.getByTestId('nps-survey-ratings');
|
|
}
|
|
|
|
getNpsSurveyFeedback(): Locator {
|
|
return this.page.getByTestId('nps-survey-feedback');
|
|
}
|
|
|
|
getNpsSurveySubmitButton(): Locator {
|
|
return this.page.getByTestId('nps-survey-feedback-button');
|
|
}
|
|
|
|
getNpsSurveyCloseButton(): Locator {
|
|
return this.getNpsSurveyModal().locator('button.el-drawer__close-btn');
|
|
}
|
|
|
|
getRatingButton(rating: number): Locator {
|
|
return this.getNpsSurveyRatings().locator('button').nth(rating);
|
|
}
|
|
|
|
getFeedbackTextarea(): Locator {
|
|
return this.getNpsSurveyFeedback().locator('textarea');
|
|
}
|
|
|
|
async clickRating(rating: number): Promise<void> {
|
|
await this.getRatingButton(rating).click();
|
|
}
|
|
|
|
async fillFeedback(feedback: string): Promise<void> {
|
|
await this.getFeedbackTextarea().fill(feedback);
|
|
}
|
|
|
|
async clickSubmitButton(): Promise<void> {
|
|
await this.getNpsSurveySubmitButton().click();
|
|
}
|
|
|
|
async closeSurvey(): Promise<void> {
|
|
await this.getNpsSurveyCloseButton().click();
|
|
}
|
|
|
|
async getRatingButtonCount(): Promise<number> {
|
|
return await this.getNpsSurveyRatings().locator('button').count();
|
|
}
|
|
}
|