mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
chore(e2e): remove broken/empty skipped tests
Remove tests that were skipped with no clear path to fix: - project-note.spec.ts: Both tests broken (createAndGoToTestProject fails) - planner-navigation: Remove broken project planner test - project.spec.ts: Remove broken create second project test Remaining skips are intentional: - perf2.spec.ts: Slow performance test - work-view.spec.ts: Documents known persistence bug
This commit is contained in:
parent
8d9ceb5776
commit
9faf80c53e
3 changed files with 0 additions and 212 deletions
|
|
@ -76,29 +76,4 @@ test.describe('Planner Navigation', () => {
|
|||
await expect(page).toHaveURL(/\/(planner|tasks)/);
|
||||
await expect(plannerPage.routerWrapper).toBeVisible();
|
||||
});
|
||||
|
||||
test.skip('should navigate to project planner', async ({
|
||||
page,
|
||||
projectPage,
|
||||
workViewPage,
|
||||
}) => {
|
||||
// Create and navigate to a test project
|
||||
await projectPage.createAndGoToTestProject();
|
||||
|
||||
// Wait for project to be fully loaded
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Add a task with schedule to ensure planner has content
|
||||
await workViewPage.addTask('Scheduled task for planner');
|
||||
await expect(page.locator('task')).toHaveCount(1, { timeout: 10000 });
|
||||
|
||||
// Navigate to planner using the button
|
||||
await plannerPage.navigateToPlanner();
|
||||
await plannerPage.waitForPlannerView();
|
||||
|
||||
// Should be on planner or tasks view - the app may redirect based on content
|
||||
// We just verify that navigation to planner works, regardless of final URL
|
||||
await expect(page).toHaveURL(/\/(planner|tasks)/);
|
||||
await expect(plannerPage.routerWrapper).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,57 +0,0 @@
|
|||
import { test, expect } from '../../fixtures/test.fixture';
|
||||
|
||||
const NOTES_WRAPPER = 'notes';
|
||||
const NOTE = 'notes note';
|
||||
const FIRST_NOTE = `${NOTE}:first-of-type`;
|
||||
const TOGGLE_NOTES_BTN = '.e2e-toggle-notes-btn';
|
||||
|
||||
test.describe('Project Note', () => {
|
||||
test.skip('create a note', async ({ page, projectPage }) => {
|
||||
// Create and navigate to default project
|
||||
await projectPage.createAndGoToTestProject();
|
||||
|
||||
// Add a note
|
||||
await projectPage.addNote('Some new Note');
|
||||
|
||||
// Move to notes wrapper area and verify note is visible
|
||||
const notesWrapper = page.locator(NOTES_WRAPPER);
|
||||
await notesWrapper.hover({ position: { x: 10, y: 50 } });
|
||||
|
||||
const firstNote = page.locator(FIRST_NOTE);
|
||||
await firstNote.waitFor({ state: 'visible' });
|
||||
await expect(firstNote).toContainText('Some new Note');
|
||||
});
|
||||
|
||||
test.skip('new note should be still available after reload', async ({
|
||||
page,
|
||||
projectPage,
|
||||
}) => {
|
||||
// Create and navigate to default project
|
||||
await projectPage.createAndGoToTestProject();
|
||||
|
||||
// Add a note
|
||||
await projectPage.addNote('Some new Note');
|
||||
|
||||
// Wait for save
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Reload the page
|
||||
await page.reload();
|
||||
|
||||
// Click toggle notes button
|
||||
const toggleNotesBtn = page.locator(TOGGLE_NOTES_BTN);
|
||||
await toggleNotesBtn.waitFor({ state: 'visible' });
|
||||
await toggleNotesBtn.click();
|
||||
|
||||
// Verify notes wrapper is present
|
||||
const notesWrapper = page.locator(NOTES_WRAPPER);
|
||||
await notesWrapper.waitFor({ state: 'visible' });
|
||||
await notesWrapper.hover({ position: { x: 10, y: 50 } });
|
||||
|
||||
// Verify note is still there
|
||||
const firstNote = page.locator(FIRST_NOTE);
|
||||
await firstNote.waitFor({ state: 'visible' });
|
||||
await expect(firstNote).toBeVisible();
|
||||
await expect(firstNote).toContainText('Some new Note');
|
||||
});
|
||||
});
|
||||
|
|
@ -41,136 +41,6 @@ test.describe('Project', () => {
|
|||
await expect(projectPage.globalErrorAlert).not.toBeVisible();
|
||||
});
|
||||
|
||||
test.skip('create second project', async ({ page, testPrefix }) => {
|
||||
// Handle empty state vs existing projects scenario
|
||||
const addProjectBtn = page
|
||||
.locator('nav-item')
|
||||
.filter({ hasText: 'Create Project' })
|
||||
.locator('button');
|
||||
const projectsGroupBtn = page
|
||||
.locator('nav-list-tree')
|
||||
.filter({ hasText: 'Projects' })
|
||||
.locator('nav-item button')
|
||||
.first();
|
||||
|
||||
// Check if we're in empty state (no projects yet) or if projects group exists
|
||||
try {
|
||||
await addProjectBtn.waitFor({ state: 'visible', timeout: 1000 });
|
||||
// Empty state: project will be created via the empty state button
|
||||
} catch {
|
||||
// Normal state: expand projects group first
|
||||
await projectsGroupBtn.waitFor({ state: 'visible', timeout: 5000 });
|
||||
const isExpanded = await projectsGroupBtn.getAttribute('aria-expanded');
|
||||
if (isExpanded !== 'true') {
|
||||
await projectsGroupBtn.click();
|
||||
// Wait for expansion by checking aria-expanded attribute
|
||||
await page.waitForFunction(
|
||||
(btn) => btn?.getAttribute('aria-expanded') === 'true',
|
||||
await projectsGroupBtn.elementHandle(),
|
||||
{ timeout: 5000 },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Create a new project
|
||||
await projectPage.createProject('Cool Test Project');
|
||||
|
||||
// Wait for project creation to complete
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// After creating, ensure Projects section exists and is expanded
|
||||
await projectsGroupBtn.waitFor({ state: 'visible', timeout: 5000 });
|
||||
|
||||
// Wait for Projects section to be expanded (the project creation should auto-expand it)
|
||||
await page
|
||||
.waitForFunction(
|
||||
() => {
|
||||
const btn = document.querySelector(
|
||||
'nav-list-tree:has(nav-item button:has-text("Projects")) nav-item button',
|
||||
);
|
||||
return btn?.getAttribute('aria-expanded') === 'true';
|
||||
},
|
||||
{ timeout: 10000 },
|
||||
)
|
||||
.catch(async () => {
|
||||
// If not expanded, try clicking the main button
|
||||
await projectsGroupBtn.click();
|
||||
});
|
||||
|
||||
// Find the newly created project directly (with test prefix)
|
||||
const expectedProjectName = testPrefix
|
||||
? `${testPrefix}-Cool Test Project`
|
||||
: 'Cool Test Project';
|
||||
|
||||
// Check if .nav-children container is visible after expansion attempts
|
||||
const navChildren = page.locator('.nav-children');
|
||||
const navChildrenExists = await navChildren.count();
|
||||
|
||||
if (navChildrenExists > 0) {
|
||||
await navChildren.waitFor({ state: 'visible', timeout: 5000 });
|
||||
} else {
|
||||
// Projects section might not have expanded properly - continue with fallback approaches
|
||||
}
|
||||
|
||||
let newProject;
|
||||
let projectFound = false;
|
||||
|
||||
// If .nav-children exists, use structured approach
|
||||
if (navChildrenExists > 0) {
|
||||
try {
|
||||
// Primary approach: nav-child-item structure with nav-item button
|
||||
newProject = page
|
||||
.locator('.nav-children .nav-child-item nav-item button')
|
||||
.filter({ hasText: expectedProjectName });
|
||||
await newProject.waitFor({ state: 'visible', timeout: 3000 });
|
||||
projectFound = true;
|
||||
} catch {
|
||||
try {
|
||||
// Second approach: any nav-child-item with the project name
|
||||
newProject = page
|
||||
.locator('.nav-child-item')
|
||||
.filter({ hasText: expectedProjectName })
|
||||
.locator('button');
|
||||
await newProject.waitFor({ state: 'visible', timeout: 3000 });
|
||||
projectFound = true;
|
||||
} catch {
|
||||
// Continue to fallback approaches
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback approaches if structured approach didn't work
|
||||
if (!projectFound) {
|
||||
try {
|
||||
// Fallback: find any button with project name in the nav area
|
||||
newProject = page
|
||||
.locator('magic-side-nav button')
|
||||
.filter({ hasText: expectedProjectName });
|
||||
await newProject.waitFor({ state: 'visible', timeout: 3000 });
|
||||
projectFound = true;
|
||||
} catch {
|
||||
// Ultimate fallback: search entire page for project button
|
||||
newProject = page.locator('button').filter({ hasText: expectedProjectName });
|
||||
await newProject.waitFor({ state: 'visible', timeout: 3000 });
|
||||
projectFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Verify the project is found and visible
|
||||
await expect(newProject).toBeVisible({ timeout: 3000 });
|
||||
|
||||
// Click on the new project
|
||||
await newProject.click();
|
||||
|
||||
// Wait for navigation to complete
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Verify we're in the new project
|
||||
await expect(projectPage.workCtxTitle).toContainText(expectedProjectName, {
|
||||
timeout: 10000,
|
||||
});
|
||||
});
|
||||
|
||||
test('navigate to project settings', async ({ page }) => {
|
||||
// Navigate to Inbox project
|
||||
const inboxMenuItem = page.locator('magic-side-nav button:has-text("Inbox")');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue