feat: Phase 3 curate with remove, retag, drag reorder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import json
|
||||
|
||||
|
||||
def test_only_kept_photos_shown(base_url, page, seed_state):
|
||||
album_id = seed_state("phase3_state")
|
||||
page.goto(f"{base_url}/curate?album_id={album_id}")
|
||||
# phase3_state has 2 kept (journal+story) and 1 skipped
|
||||
assert page.locator(".photo-card").count() == 2
|
||||
|
||||
|
||||
def test_remove_reverts_to_skip(base_url, page, seed_state, flask_app):
|
||||
album_id = seed_state("phase3_state")
|
||||
page.goto(f"{base_url}/curate?album_id={album_id}")
|
||||
page.locator(".remove-btn").first.click()
|
||||
page.wait_for_timeout(300)
|
||||
assert page.locator(".photo-card").count() == 1
|
||||
with flask_app.app_context():
|
||||
from app.state import load_state
|
||||
state = load_state(album_id, flask_app)
|
||||
removed = next(p for p in state.photos if p.id == "asset-1")
|
||||
assert removed.tag == "skip"
|
||||
|
||||
|
||||
def test_retag_journal_to_story(base_url, page, seed_state, flask_app):
|
||||
album_id = seed_state("phase3_state")
|
||||
page.goto(f"{base_url}/curate?album_id={album_id}")
|
||||
page.locator(".retag-btn").first.click()
|
||||
page.wait_for_timeout(300)
|
||||
with flask_app.app_context():
|
||||
from app.state import load_state
|
||||
state = load_state(album_id, flask_app)
|
||||
p = next(p for p in state.photos if p.id == "asset-1")
|
||||
assert p.tag == "story"
|
||||
|
||||
|
||||
def test_done_advances_to_group(base_url, page, seed_state):
|
||||
album_id = seed_state("phase3_state")
|
||||
page.goto(f"{base_url}/curate?album_id={album_id}")
|
||||
page.locator("#done-btn").click()
|
||||
page.wait_for_url("**/group**")
|
||||
Reference in New Issue
Block a user