Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
34 changes: 3 additions & 31 deletions e2e/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ test.describe('Task Manager App', () => {
});

test('should display header stats', async ({ page }) => {
await expect(page.locator('#totalPoints')).toHaveText('0');
await expect(page.locator('#userLevel')).toHaveText('1');
await expect(page.locator('#dailyStreak')).toHaveText('0');
});
Expand Down Expand Up @@ -236,31 +235,6 @@ test.describe('Task Manager App', () => {
});
});

// ========================
// Rewards Shop
// ========================
test.describe('rewards shop', () => {
test.beforeEach(async ({ page }) => {
await page.click('[data-tab="shop"]');
});

test('should show points display', async ({ page }) => {
await expect(page.locator('#shopPointsDisplay')).toHaveText('0');
});

test('should create a reward', async ({ page }) => {
await page.click('#addRewardBtn');
await page.fill('#rewardName', 'Movie Night');
await page.fill('#rewardDescription', 'Watch a movie');
await page.fill('#rewardCost', '100');
await page.click('#rewardForm button[type="submit"]');

await expect(page.locator('#rewardModal')).not.toHaveClass(/active/);
await expect(page.locator('.project-card')).toBeVisible();
await expect(page.locator('.project-title')).toContainText('Movie Night');
});
});

// ========================
// Date Navigation
// ========================
Expand Down Expand Up @@ -319,7 +293,6 @@ test.describe('Task Manager App', () => {
title: 'Overdue Task',
dueDate: dueDate,
priority: 'medium',
points: 10,
repeatType: 'none',
completed: false,
createdDate: new Date().toISOString()
Expand All @@ -346,7 +319,6 @@ test.describe('Task Manager App', () => {
title: 'Completed Old Task',
dueDate: dueDate,
priority: 'medium',
points: 10,
repeatType: 'none',
completed: true,
completedDate: dueDate,
Expand Down Expand Up @@ -383,9 +355,9 @@ test.describe('Task Manager App', () => {
await page.evaluate(() => {
const data = JSON.parse(localStorage.getItem('taskManagerData') || '{}');
data.tasks = [
{ id: 'task-high', title: 'High Task', priority: 'high', points: 10, repeatType: 'none', completed: false, createdDate: new Date().toISOString(), category: 'Work' },
{ id: 'task-medium', title: 'Medium Task', priority: 'medium', points: 10, repeatType: 'none', completed: false, createdDate: new Date().toISOString(), category: 'Personal' },
{ id: 'task-low', title: 'Low Task', priority: 'low', points: 10, repeatType: 'none', completed: false, createdDate: new Date().toISOString() },
{ id: 'task-high', title: 'High Task', priority: 'high', repeatType: 'none', completed: false, createdDate: new Date().toISOString(), category: 'Work' },
{ id: 'task-medium', title: 'Medium Task', priority: 'medium', repeatType: 'none', completed: false, createdDate: new Date().toISOString(), category: 'Personal' },
{ id: 'task-low', title: 'Low Task', priority: 'low', repeatType: 'none', completed: false, createdDate: new Date().toISOString() },
];
localStorage.setItem('taskManagerData', JSON.stringify(data));
});
Expand Down
69 changes: 0 additions & 69 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
<div class="header-content">
<h1>📋 Task Manager</h1>
<div class="header-stats">
<div class="stat">
<span class="stat-label">Points</span>
<span class="stat-value" id="totalPoints">0</span>
</div>
<div class="stat">
<span class="stat-label">Level</span>
<span class="stat-value" id="userLevel">1</span>
Expand Down Expand Up @@ -64,7 +60,6 @@ <h1>📋 Task Manager</h1>
<button class="nav-tab" data-tab="tasks">✓ Tasks</button>
<button class="nav-tab" data-tab="projects">📁 Projects</button>
<button class="nav-tab" data-tab="habits">⭐ Habits</button>
<button class="nav-tab" data-tab="shop">🛒 Shop</button>
<button class="nav-tab" data-tab="wishlist">🎁 Wish List</button>
<button class="nav-tab" data-tab="notes">📝 Notes</button>
<button class="nav-tab" data-tab="finances">💰 Finances</button>
Expand Down Expand Up @@ -203,10 +198,6 @@ <h3>Task Details</h3>
<option value="high">High</option>
</select>
</div>
<div class="form-group">
<label for="taskPoints">Points Value</label>
<input type="number" id="taskPoints" min="1" value="10">
</div>
</div>
<div class="form-group">
<label for="taskRepeatType">Repeat Type</label>
Expand Down Expand Up @@ -403,10 +394,6 @@ <h3>Daily Habit</h3>
</div>
</div>
</div>
<div class="form-group">
<label for="habitPoints">Points Value</label>
<input type="number" id="habitPoints" min="1" value="10">
</div>
<div class="form-group">
<label for="habitTargetGoal">Daily Target Goal</label>
<input type="number" id="habitTargetGoal" min="1" value="1" placeholder="e.g., 10 for 10 push-ups">
Expand Down Expand Up @@ -568,62 +555,6 @@ <h3 id="financeModalTitle">Add Finance Item</h3>
</div>
</section>

<!-- Shop Tab -->
<section class="tab-content" id="shop-tab">
<div class="shop-container">
<div class="shop-header">
<h2>Reward Shop</h2>
<button class="btn btn-primary" id="addRewardBtn">+ Add Reward</button>
</div>

<div class="shop-points-display" style="margin-bottom: 1.5rem; text-align: center;">
<p style="font-size: 0.9rem; color: #666; margin: 0;">Available Points</p>
<p style="font-size: 2rem; font-weight: bold; color: #4CAF50; margin: 0.5rem 0;" id="shopPointsDisplay">0</p>
</div>

<!-- Rewards List -->
<div class="rewards-list" id="rewardsList">
<p class="empty-state">No rewards yet. Add rewards to spend your points on!</p>
</div>
</div>

<!-- Reward Modal -->
<div class="modal" id="rewardModal">
<div class="modal-content">
<div class="modal-header">
<h3 id="rewardModalTitle">Add Reward</h3>
<button class="close-btn">&times;</button>
</div>
<form id="rewardForm" class="reward-form">
<div class="form-group">
<label for="rewardName">Reward Name *</label>
<input type="text" id="rewardName" required>
</div>
<div class="form-group">
<label for="rewardDescription">Description</label>
<textarea id="rewardDescription" rows="3"></textarea>
</div>
<div class="form-group">
<label for="rewardCost">Point Cost *</label>
<input type="number" id="rewardCost" min="1" required>
</div>
<div class="form-group">
<label for="rewardRepeatable">Repeatable?</label>
<select id="rewardRepeatable">
<option value="true" selected>Repeatable</option>
<option value="false">One-time</option>
</select>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Save Reward</button>
<button type="button" class="btn btn-secondary" id="deleteRewardBtn" style="display: none;">Delete</button>
<button type="button" class="btn btn-secondary" id="cancelRewardBtn">Cancel</button>
</div>
</form>
</div>
</div>
</section>

<!-- Wish List Tab -->
<section class="tab-content" id="wishlist-tab">
<div class="wishlist-container">
Expand Down
Loading
Loading