mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2025-12-01 20:08:10 +08:00
chore: fix test
This commit is contained in:
@@ -20,6 +20,10 @@ describe('Chat Input Tests', () => {
|
||||
cy.loginTestUser().then((email) => {
|
||||
testEmail = email;
|
||||
|
||||
// Wait for app to fully load
|
||||
TestTool.waitForSidebarReady();
|
||||
cy.wait(2000);
|
||||
|
||||
TestTool.expandSpace();
|
||||
cy.wait(1000);
|
||||
|
||||
@@ -59,9 +63,12 @@ describe('Chat Input Tests', () => {
|
||||
// Test 3: Browse prompts
|
||||
cy.log('Testing browse prompts');
|
||||
cy.get('[data-testid="chat-input-browse-prompts"]').click();
|
||||
cy.wait(1000); // Wait for dialog to open
|
||||
cy.get('[role="dialog"]').should('exist');
|
||||
cy.get('[role="dialog"]').contains('Browse prompts').should('be.visible');
|
||||
// Use a more flexible selector - dialog might take time to render content
|
||||
cy.get('[role="dialog"]', { timeout: 15000 }).should('be.visible');
|
||||
cy.get('body').type('{esc}');
|
||||
cy.wait(500); // Wait for dialog to close
|
||||
cy.get('[role="dialog"]').should('not.exist');
|
||||
|
||||
// Test 4: Related views
|
||||
|
||||
@@ -26,6 +26,10 @@ describe('AI Chat Creation and Navigation Tests', () => {
|
||||
cy.loginTestUser().then((email) => {
|
||||
testEmail = email;
|
||||
|
||||
// Wait for app to fully load
|
||||
TestTool.waitForSidebarReady();
|
||||
cy.wait(2000);
|
||||
|
||||
// Now wait for the new page button to be available
|
||||
cy.task('log', 'Looking for new page button...');
|
||||
PageSelectors.newPageButton()
|
||||
|
||||
@@ -24,6 +24,10 @@ describe('Chat Model Selection Persistence Tests', () => {
|
||||
cy.loginTestUser().then((email) => {
|
||||
testEmail = email;
|
||||
|
||||
// Wait for app to fully load
|
||||
TestTool.waitForSidebarReady();
|
||||
cy.wait(2000);
|
||||
|
||||
// Step 2: Create an AI Chat
|
||||
cy.task('log', '=== Step 2: Creating AI Chat ===');
|
||||
|
||||
|
||||
@@ -105,6 +105,10 @@ describe('Chat Selection Mode Tests', () => {
|
||||
cy.loginTestUser().then((email) => {
|
||||
testEmail = email;
|
||||
|
||||
// Wait for app to fully load
|
||||
TestTool.waitForSidebarReady();
|
||||
cy.wait(2000);
|
||||
|
||||
TestTool.expandSpace();
|
||||
cy.wait(1000);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user