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

mozilla / blurts-server / #13283

pending completion
#13283

push

circleci

Vinnl
Add a maximum width for email address

On large viewports, we don't want the hero content part to
endlessly grow if the user's email address happens to be
ridiculously long. This change limits it to a reasonable size that
maintains readability for the regular content, and truncates the
email address if it is wider than that.

282 of 1679 branches covered (16.8%)

Branch coverage included in aggregate %.

959 of 4548 relevant lines covered (21.09%)

1.76 hits per line

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

0.0
/lib/remote-settings.js
1
'use strict'
2

3
const got = require('got')
×
4
const AppConstants = require('../app-constants')
×
5

6
const BREACHES_COLLECTION = 'fxmonitor-breaches'
×
7
const FX_RS_COLLECTION = `${AppConstants.FX_REMOTE_SETTINGS_WRITER_SERVER}/buckets/main-workspace/collections/${BREACHES_COLLECTION}`
×
8
const FX_RS_RECORDS = `${FX_RS_COLLECTION}/records`
×
9
const FX_RS_WRITER_USER = AppConstants.FX_REMOTE_SETTINGS_WRITER_USER
×
10
const FX_RS_WRITER_PASS = AppConstants.FX_REMOTE_SETTINGS_WRITER_PASS
×
11

12
const RemoteSettings = {
×
13

14
  async whichBreachesAreNotInRemoteSettingsYet (breaches) {
15
    const fxRSRecords = await got(FX_RS_RECORDS, {
×
16
      responseType: 'json',
17
      username: FX_RS_WRITER_USER,
18
      password: FX_RS_WRITER_PASS
19
    })
20
    const remoteSettingsBreachesSet = new Set(
×
21
      fxRSRecords.body.data.map(b => b.Name)
×
22
    )
23

24
    return breaches.filter(({ Name }) => !remoteSettingsBreachesSet.has(Name))
×
25
  },
26

27
  async postNewBreachToBreachesCollection (data) {
28
    // Create the record
29
    return await got.post(FX_RS_RECORDS, {
×
30
      username: FX_RS_WRITER_USER,
31
      password: FX_RS_WRITER_PASS,
32
      json: { data },
33
      responseType: 'json'
34
    })
35
  },
36

37
  async requestReviewOnBreachesCollection () {
38
    return await got.patch(FX_RS_COLLECTION, {
×
39
      username: FX_RS_WRITER_USER,
40
      password: FX_RS_WRITER_PASS,
41
      json: { data: { status: 'to-review' } },
42
      responseType: 'json'
43
    })
44
  }
45
}
46

47
module.exports = RemoteSettings
×
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