//
//  HeaderMoodLoggingTests.swift
//  Tests iOS
//
//  Header quick-entry mood logging tests.
//

import XCTest

final class HeaderMoodLoggingTests: BaseUITestCase {
    override var seedFixture: String? { "empty" }

    /// TC-002: Log a mood from the header quick-entry and verify an entry row appears.
    func testLogMood_FromHeader_CreatesEntry() {
        let dayScreen = DayScreen(app: app)

        // 1. Verify mood header is visible (empty state shows the voting header)
        dayScreen.assertMoodHeaderVisible()

        // 2. Tap "Good" mood button on the header
        dayScreen.logMood(.good)

        // 3. The header should disappear after the celebration animation
        dayScreen.assertMoodHeaderHidden()

        // 4. Verify at least one entry row appeared.
        dayScreen.assertAnyEntryExists()

        captureScreenshot(name: "header_mood_logged_good")
    }
}
