PICK SKY: natal wheel planet tooltips + FT modernisation
- natus-wheel.js: per-planet <g> group with data-planet/sign/degree/retrograde attrs; mouseover/mouseout on group (pointer-events:none on child text/℞ so the whole apparatus triggers hover); tooltip uses .tt-title/.tt-description; in-sign degree via _inSignDeg() (ecliptic % 30); D3 switched from CDN to local d3.min.js - _natus.scss: .nw-planet--hover glow; #id_natus_tooltip position:fixed z-200 - _natus_overlay.html: tooltip div uses .tt; local d3.min.js script tag - T3/T4/T5 converted from Selenium execute_script to Jasmine unit tests (NatusWheelSpec.js) — NatusWheel was never defined in headless GeckoDriver; SpecRunner.html updated to load D3 + natus-wheel.js - test_pick_sky.py: NatusWheelTooltipTest removed (replaced by Jasmine) - test_component_cards_tarot / test_trinket_carte_blanche: equip assertions updated from legacy .equip-deck-btn/.equip-trinket-btn mini-tooltip pattern to current DON|DOFF (.btn-equip in main portal); mini-portal text assertions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -106,7 +106,7 @@ class CarteBlancheTest(FunctionalTest):
|
||||
)
|
||||
)
|
||||
|
||||
# 3. Hover Carte Blanche — main tooltip present; mini tooltip shows "Equip Trinket?"
|
||||
# 3. Hover Carte Blanche — main tooltip present; mini shows "Not Equipped"; DON active
|
||||
carte_el = self.browser.find_element(By.ID, "id_kit_carte_blanche")
|
||||
self.browser.execute_script(
|
||||
"arguments[0].scrollIntoView({block: 'center'})", carte_el
|
||||
@@ -122,14 +122,16 @@ class CarteBlancheTest(FunctionalTest):
|
||||
self.assertIn("no expiry", portal.text)
|
||||
mini = self.browser.find_element(By.ID, "id_mini_tooltip_portal")
|
||||
self.wait_for(lambda: self.assertTrue(mini.is_displayed()))
|
||||
equip_btn = mini.find_element(By.CSS_SELECTOR, ".equip-trinket-btn")
|
||||
self.assertEqual(equip_btn.text, "Equip Trinket?")
|
||||
self.assertIn("Not Equipped", mini.text)
|
||||
don = portal.find_element(By.CSS_SELECTOR, ".btn-equip")
|
||||
self.assertNotIn("btn-disabled", don.get_attribute("class"))
|
||||
|
||||
# 4. Click "Equip Trinket?" — DB switches; both portals close
|
||||
equip_btn.click()
|
||||
# 4. Click DON — DON becomes disabled; data-equipped-id set optimistically
|
||||
don.click()
|
||||
self.wait_for(
|
||||
lambda: self.assertFalse(
|
||||
self.browser.find_element(By.ID, "id_tooltip_portal").is_displayed()
|
||||
lambda: self.assertIn(
|
||||
"btn-disabled",
|
||||
portal.find_element(By.CSS_SELECTOR, ".btn-equip").get_attribute("class"),
|
||||
)
|
||||
)
|
||||
|
||||
@@ -141,13 +143,8 @@ class CarteBlancheTest(FunctionalTest):
|
||||
str(self.carte.pk),
|
||||
)
|
||||
)
|
||||
# NOTE: re-hovering carte_el here to assert "Equipped" in mini is unreliable in
|
||||
# headless GeckoDriver — move_to_element uses a different scroll-into-view algorithm
|
||||
# than scrollIntoView({block:'center'}), so the computed element centre can match the
|
||||
# cursor's current position and no mousemove fires. The equip round-trip is validated
|
||||
# implicitly by the DB-side check below (step 6: Pass now shows "Equip Trinket?").
|
||||
|
||||
# 6. Hover Backstage Pass — mini tooltip shows "Equip Trinket?" (Pass no longer equipped)
|
||||
# 6. Hover Backstage Pass — mini shows "Not Equipped" (Pass no longer equipped)
|
||||
pass_el = self.browser.find_element(By.ID, "id_kit_pass")
|
||||
ActionChains(self.browser).move_to_element(pass_el).perform()
|
||||
self.wait_for(
|
||||
@@ -158,7 +155,7 @@ class CarteBlancheTest(FunctionalTest):
|
||||
)
|
||||
mini = self.browser.find_element(By.ID, "id_mini_tooltip_portal")
|
||||
self.wait_for(lambda: self.assertTrue(mini.is_displayed()))
|
||||
self.assertTrue(mini.find_element(By.CSS_SELECTOR, ".equip-trinket-btn").is_displayed())
|
||||
self.assertIn("Not Equipped", mini.text)
|
||||
|
||||
# ── GATEKEEPER PHASE ─────────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user