note banner NVM: btn-danger → btn-cancel (orange)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@ const Note = (() => {
|
|||||||
'</time>' +
|
'</time>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="note-banner__image"></div>' +
|
'<div class="note-banner__image"></div>' +
|
||||||
'<button type="button" class="btn btn-danger note-banner__nvm">NVM</button>' +
|
'<button type="button" class="btn btn-cancel note-banner__nvm">NVM</button>' +
|
||||||
'<a href="/billboard/my-notes/" class="btn btn-caution note-banner__fyi">FYI</a>';
|
'<a href="/billboard/my-notes/" class="btn btn-caution note-banner__fyi">FYI</a>';
|
||||||
|
|
||||||
banner.querySelector('.note-banner__nvm').addEventListener('click', function () {
|
banner.querySelector('.note-banner__nvm').addEventListener('click', function () {
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ class StargazerNoteFromDashboardTest(FunctionalTest):
|
|||||||
banner.find_element(By.CSS_SELECTOR, ".note-banner__description")
|
banner.find_element(By.CSS_SELECTOR, ".note-banner__description")
|
||||||
banner.find_element(By.CSS_SELECTOR, ".note-banner__timestamp")
|
banner.find_element(By.CSS_SELECTOR, ".note-banner__timestamp")
|
||||||
banner.find_element(By.CSS_SELECTOR, ".note-banner__image")
|
banner.find_element(By.CSS_SELECTOR, ".note-banner__image")
|
||||||
banner.find_element(By.CSS_SELECTOR, ".btn.btn-danger") # NVM
|
banner.find_element(By.CSS_SELECTOR, ".btn.btn-cancel") # NVM
|
||||||
fyi = banner.find_element(By.CSS_SELECTOR, ".btn.btn-caution") # FYI
|
fyi = banner.find_element(By.CSS_SELECTOR, ".btn.btn-caution") # FYI
|
||||||
|
|
||||||
# FYI navigates to Note page
|
# FYI navigates to Note page
|
||||||
@@ -296,7 +296,7 @@ class StargazerNoteFromSkyPageTest(FunctionalTest):
|
|||||||
|
|
||||||
def test_first_valid_save_on_sky_page_fires_banner_and_nvm_dismisses(self):
|
def test_first_valid_save_on_sky_page_fires_banner_and_nvm_dismisses(self):
|
||||||
"""First valid SAVE SKY on /dashboard/sky/ fires the Stargazer banner.
|
"""First valid SAVE SKY on /dashboard/sky/ fires the Stargazer banner.
|
||||||
NVM (.btn.btn-danger) dismisses it."""
|
NVM (.btn.btn-cancel) dismisses it."""
|
||||||
self.create_pre_authenticated_session("stargazer@test.io")
|
self.create_pre_authenticated_session("stargazer@test.io")
|
||||||
self.browser.get(self.sky_url)
|
self.browser.get(self.sky_url)
|
||||||
|
|
||||||
@@ -316,7 +316,7 @@ class StargazerNoteFromSkyPageTest(FunctionalTest):
|
|||||||
banner.find_element(By.CSS_SELECTOR, ".note-banner__title").text,
|
banner.find_element(By.CSS_SELECTOR, ".note-banner__title").text,
|
||||||
)
|
)
|
||||||
|
|
||||||
banner.find_element(By.CSS_SELECTOR, ".btn.btn-danger").click()
|
banner.find_element(By.CSS_SELECTOR, ".btn.btn-cancel").click()
|
||||||
self.wait_for(lambda: self.assertFalse(
|
self.wait_for(lambda: self.assertFalse(
|
||||||
self.browser.find_elements(By.CSS_SELECTOR, ".note-banner")
|
self.browser.find_elements(By.CSS_SELECTOR, ".note-banner")
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -88,9 +88,9 @@ describe('Note.showBanner', () => {
|
|||||||
|
|
||||||
// ── T7 ── NVM button ──────────────────────────────────────────────────────
|
// ── T7 ── NVM button ──────────────────────────────────────────────────────
|
||||||
|
|
||||||
it('T7: banner has a .btn.btn-danger NVM button', () => {
|
it('T7: banner has a .btn.btn-cancel NVM button', () => {
|
||||||
Note.showBanner(SAMPLE_NOTE);
|
Note.showBanner(SAMPLE_NOTE);
|
||||||
expect(document.querySelector('.note-banner .btn.btn-danger')).not.toBeNull();
|
expect(document.querySelector('.note-banner .btn.btn-cancel')).not.toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
// ── T8 ── FYI link ────────────────────────────────────────────────────────
|
// ── T8 ── FYI link ────────────────────────────────────────────────────────
|
||||||
@@ -106,7 +106,7 @@ describe('Note.showBanner', () => {
|
|||||||
|
|
||||||
it('T9: clicking the NVM button removes the banner from the DOM', () => {
|
it('T9: clicking the NVM button removes the banner from the DOM', () => {
|
||||||
Note.showBanner(SAMPLE_NOTE);
|
Note.showBanner(SAMPLE_NOTE);
|
||||||
document.querySelector('.note-banner .btn.btn-danger').click();
|
document.querySelector('.note-banner .btn.btn-cancel').click();
|
||||||
expect(document.querySelector('.note-banner')).toBeNull();
|
expect(document.querySelector('.note-banner')).toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user