Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 2 additions & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

env:
CLOUD_VERSION: latest-amd64
APPFLOWY_ENABLE_RELATION_ROLLUP_EDIT: "true"

jobs:
# Run different test categories in parallel for 6x speedup
Expand Down Expand Up @@ -208,4 +209,4 @@ jobs:
pkill -f "bun deploy/server.ts" 2>/dev/null || true

# Stop Docker services
cd AppFlowy-Cloud-Premium && docker compose down || true
cd AppFlowy-Cloud-Premium && docker compose down || true
3 changes: 3 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default defineConfig({
APPFLOWY_BASE_URL: process.env.APPFLOWY_BASE_URL || 'http://localhost',
APPFLOWY_GOTRUE_BASE_URL: process.env.APPFLOWY_GOTRUE_BASE_URL || 'http://localhost/gotrue',
APPFLOWY_WS_BASE_URL: process.env.APPFLOWY_WS_BASE_URL || 'ws://localhost/ws/v2',
APPFLOWY_ENABLE_RELATION_ROLLUP_EDIT: process.env.APPFLOWY_ENABLE_RELATION_ROLLUP_EDIT || 'false',
GOTRUE_ADMIN_EMAIL: process.env.GOTRUE_ADMIN_EMAIL || '[email protected]',
GOTRUE_ADMIN_PASSWORD: process.env.GOTRUE_ADMIN_PASSWORD || 'password',
},
Expand Down Expand Up @@ -64,6 +65,8 @@ export default defineConfig({
config.env.APPFLOWY_BASE_URL = process.env.APPFLOWY_BASE_URL || config.env.APPFLOWY_BASE_URL;
config.env.APPFLOWY_GOTRUE_BASE_URL = process.env.APPFLOWY_GOTRUE_BASE_URL || config.env.APPFLOWY_GOTRUE_BASE_URL;
config.env.APPFLOWY_WS_BASE_URL = process.env.APPFLOWY_WS_BASE_URL || config.env.APPFLOWY_WS_BASE_URL;
config.env.APPFLOWY_ENABLE_RELATION_ROLLUP_EDIT =
process.env.APPFLOWY_ENABLE_RELATION_ROLLUP_EDIT || config.env.APPFLOWY_ENABLE_RELATION_ROLLUP_EDIT;
config.env.GOTRUE_ADMIN_EMAIL = process.env.GOTRUE_ADMIN_EMAIL || config.env.GOTRUE_ADMIN_EMAIL;
config.env.GOTRUE_ADMIN_PASSWORD = process.env.GOTRUE_ADMIN_PASSWORD || config.env.GOTRUE_ADMIN_PASSWORD;

Expand Down
49 changes: 49 additions & 0 deletions cypress/e2e/database/database-view-tabs.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { v4 as uuidv4 } from 'uuid';
import { AuthTestUtils } from '../../support/auth-utils';
import {
AddPageSelectors,
BreadcrumbSelectors,
DatabaseViewSelectors,
PageSelectors,
SpaceSelectors,
Expand Down Expand Up @@ -236,6 +237,54 @@ describe('Database View Tabs', () => {
});
});

/**
* Regression test: breadcrumb should reflect the active database tab view.
*/
it('breadcrumb shows active database tab view', () => {
const testEmail = generateRandomEmail();

cy.task('log', `[TEST] Breadcrumb reflects active tab - Email: ${testEmail}`);

cy.visit('/login', { failOnStatusCode: false });
cy.wait(2000);

const authUtils = new AuthTestUtils();
authUtils.signInWithTestUrl(testEmail).then(() => {
cy.url({ timeout: 30000 }).should('include', '/app');
cy.wait(3000);

// Create a Grid database
AddPageSelectors.inlineAddButton().first().click({ force: true });
waitForReactUpdate(1000);
AddPageSelectors.addGridButton().should('be.visible').click({ force: true });
cy.wait(5000);

// Add a Board view
DatabaseViewSelectors.addViewButton().scrollIntoView().click({ force: true });
waitForReactUpdate(500);
cy.get('[role="menu"], [role="listbox"], .MuiMenu-list, .MuiPopover-paper', { timeout: 5000 })
.should('be.visible')
.contains('Board')
.click({ force: true });
waitForReactUpdate(3000);

// Switch to Board tab
DatabaseViewSelectors.viewTab().contains('Board').click({ force: true });
waitForReactUpdate(1000);
DatabaseViewSelectors.activeViewTab().should('contain.text', 'Board');

// Verify breadcrumb shows Board as the active view
BreadcrumbSelectors.navigation()
.find('[data-testid^="breadcrumb-item-"]')
.should('have.length.at.least', 1)
.last()
.should('contain.text', 'Board')
.and('not.contain.text', 'Grid');

cy.task('log', '[TEST COMPLETE] Breadcrumb shows active tab view');
});
});

/**
* Regression test for: newly created views should appear immediately in tab bar.
*
Expand Down
Loading
Loading