refactor(e2e): split spec files under 300-line limit
- phase-c.test.ts (626 lines) → phase-c-ui.test.ts (279), phase-c-tabs.test.ts (272), phase-c-llm.test.ts (76) — all 11 scenarios preserved - agor.test.ts (799 lines) → smoke.test.ts (47), workspace.test.ts (79), settings.test.ts (247), features.test.ts (488) — split in progress - Reset-to-home-state hooks added to stateful before() blocks - wdio.conf.js specs array updated for all new filenames
This commit is contained in:
parent
e76bc341f2
commit
f08c4b18cf
9 changed files with 1495 additions and 628 deletions
47
tests/e2e/specs/smoke.test.ts
Normal file
47
tests/e2e/specs/smoke.test.ts
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
import { browser, expect } from '@wdio/globals';
|
||||
|
||||
describe('BTerminal — Smoke Tests', () => {
|
||||
it('should render the application window', async () => {
|
||||
// Wait for the app to fully load before any tests
|
||||
await browser.waitUntil(
|
||||
async () => (await browser.getTitle()) === 'BTerminal',
|
||||
{ timeout: 10_000, timeoutMsg: 'App did not load within 10s' },
|
||||
);
|
||||
const title = await browser.getTitle();
|
||||
expect(title).toBe('BTerminal');
|
||||
});
|
||||
|
||||
it('should display the status bar', async () => {
|
||||
const statusBar = await browser.$('.status-bar');
|
||||
await expect(statusBar).toBeDisplayed();
|
||||
});
|
||||
|
||||
it('should show version text in status bar', async () => {
|
||||
const version = await browser.$('.status-bar .version');
|
||||
await expect(version).toBeDisplayed();
|
||||
const text = await version.getText();
|
||||
expect(text).toContain('BTerminal');
|
||||
});
|
||||
|
||||
it('should display the sidebar rail', async () => {
|
||||
const sidebarRail = await browser.$('.sidebar-rail');
|
||||
await expect(sidebarRail).toBeDisplayed();
|
||||
});
|
||||
|
||||
it('should display the workspace area', async () => {
|
||||
const workspace = await browser.$('.workspace');
|
||||
await expect(workspace).toBeDisplayed();
|
||||
});
|
||||
|
||||
it('should toggle sidebar with settings button', async () => {
|
||||
const settingsBtn = await browser.$('.rail-btn');
|
||||
await settingsBtn.click();
|
||||
|
||||
const sidebarPanel = await browser.$('.sidebar-panel');
|
||||
await expect(sidebarPanel).toBeDisplayed();
|
||||
|
||||
// Click again to close
|
||||
await settingsBtn.click();
|
||||
await expect(sidebarPanel).not.toBeDisplayed();
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue