• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla / blurts-server / #11685

pending completion
#11685

push

circleci

web-flow
Merge pull request #2736 from mozilla/MNTOR-1010/breach-email-filter

Mntor 1010/breach email filter

278 of 1110 branches covered (25.05%)

Branch coverage included in aggregate %.

22 of 22 new or added lines in 3 files covered. (100.0%)

948 of 2996 relevant lines covered (31.64%)

2.54 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/client/js/partials/breaches.js
1
const select = document.querySelector('.breaches-header custom-select')
×
2
let breaches
3

4
function handleChange (e) {
5
  let i = 0
×
6

7
  breaches.forEach(breach => {
×
8
    const hidden = breach.toggleAttribute('hidden', breach.dataset.email !== e.target.value)
×
9
    if (!hidden) {
×
10
      breach.style.setProperty('--delay', `${i}ms`)
×
11
      i += 50
×
12
    }
13
  })
14
}
15

16
if (select) {
×
17
  breaches = document.querySelectorAll('.breach-row')
×
18
  select.addEventListener('change', handleChange)
×
19
}
20

21
// TODO: REMOVE -- this is just an example of updating breach resolution
22
// update button
23
const b = document.getElementById('update-breaches')
×
24
if (b) {
×
25
  console.log('breaches update test')
×
26
  b.addEventListener('click', async _ => {
×
27
    try {
×
28
      const resp = await fetch('api/v1/user/breaches', {
×
29
        method: 'PUT',
30
        headers: {
31
          'Content-Type': 'application/json'
32
        },
33
        body: JSON.stringify({
34
          affectedEmail: 'affected@email.com',
35
          recencyIndex: '13',
36
          resolutionsChecked: ['passwords',
37
            'dates-of-birth', 'email-addresses']
38
        })
39
      })
40

41
      console.log('completed: ', resp.json())
×
42
    } catch (err) {
43
      console.error(`Error: ${err}`)
×
44
    }
45
  })
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc