test(electrobun): expand E2E suite — 75 new tests (120 total, 14 spec files)
New specs: search, files, comms, tasks, theme, groups, keyboard, notifications, diagnostics, splash. All under 300 lines, CSS class selectors matching actual components, display toggle aware.
This commit is contained in:
parent
e73aeb4aaf
commit
dd1d692e7b
11 changed files with 755 additions and 0 deletions
69
ui-electrobun/tests/e2e/specs/diagnostics.test.ts
Normal file
69
ui-electrobun/tests/e2e/specs/diagnostics.test.ts
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/**
|
||||
* Diagnostics settings tab tests — connection status, fleet info, refresh.
|
||||
*/
|
||||
|
||||
describe("Diagnostics tab", () => {
|
||||
before(async () => {
|
||||
// Open settings
|
||||
const gear = await $(".sidebar-icon");
|
||||
await gear.click();
|
||||
await browser.pause(500);
|
||||
|
||||
// Click Diagnostics tab (last category)
|
||||
const cats = await $$(".cat-btn");
|
||||
const diagCat = cats[cats.length - 1];
|
||||
if (diagCat) {
|
||||
await diagCat.click();
|
||||
await browser.pause(300);
|
||||
}
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await browser.keys("Escape");
|
||||
await browser.pause(300);
|
||||
});
|
||||
|
||||
it("should render the diagnostics container", async () => {
|
||||
const diag = await $(".diagnostics");
|
||||
if (await diag.isExisting()) {
|
||||
expect(await diag.isDisplayed()).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
it("should show 'Transport Diagnostics' heading", async () => {
|
||||
const heading = await $(".diagnostics .sh");
|
||||
if (await heading.isExisting()) {
|
||||
expect(await heading.getText()).toContain("Transport Diagnostics");
|
||||
}
|
||||
});
|
||||
|
||||
it("should show PTY daemon connection status", async () => {
|
||||
const keys = await $$(".diag-key");
|
||||
if (keys.length > 0) {
|
||||
const texts = await Promise.all(keys.map((k) => k.getText()));
|
||||
expect(texts.some((t) => t.includes("PTY"))).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
it("should show agent fleet section", async () => {
|
||||
const labels = await $$(".diag-label");
|
||||
if (labels.length > 0) {
|
||||
const texts = await Promise.all(labels.map((l) => l.getText()));
|
||||
expect(texts.some((t) => t.toLowerCase().includes("agent fleet"))).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
it("should show last refresh timestamp", async () => {
|
||||
const footer = await $(".diag-footer");
|
||||
if (await footer.isExisting()) {
|
||||
expect(await footer.isDisplayed()).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
it("should have a refresh button", async () => {
|
||||
const refreshBtn = await $(".refresh-btn");
|
||||
if (await refreshBtn.isExisting()) {
|
||||
expect(await refreshBtn.isClickable()).toBe(true);
|
||||
}
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue