Skip to content

Tests: cover more RuleLogic edge cases (SSID, time window, day mask) #23

Open

Description

@wized2

Task

Extend RuleLogicTest.kt with edge cases for ssidMatches, inTimeWindow, dayBitSet and shouldFireBattery:

  • SSID: blank pattern, different case, SSID with quotes or spaces
  • Time window: start == end, window ending exactly at midnight, 23:59 -> 00:00
  • Day mask: mask 0, all days set, Sunday and Saturday boundaries
  • Battery: threshold 0 and 100, previous value -1 (first run)

Acceptance

  • ./gradlew testStableDebugUnitTest passes
  • If a test exposes a real bug, describe it in the PR and mark the test with a comment

Please comment before starting, and open the PR against beta.

Size

S, pure Kotlin.

Activity

  1. anubhavaanand commented on Nov 11, 2026

    @anubhavaanand

    I'd like to take this one too. I'll extend RuleLogicTest.kt with the SSID, time-window, day-mask, and battery edge cases, run ./gradlew testStableDebugUnitTest, and open a separate PR against beta so each issue stays small.

  2. anubhavaanand commented on Nov 14, 2026

    @anubhavaanand

    PR #25 merged into beta on 2026-11-13: RuleLogicTest.kt now covers the SSID, time-window, day-mask and battery edge cases listed above, ./gradlew testStableDebugUnitTest passes with 32 tests, and no production bug surfaced. The Closes #23 line did not auto-close this issue because the PR targets beta rather than the default branch main. Could a maintainer close it? I only have read access on the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomershelp wantedExtra attention is neededsize/SAttracts first-time contributors

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions