Merge branch 'main' into MNTOR-2069-README

This commit is contained in:
Raphael Okafor Jr 2023-08-31 13:44:38 -04:00 коммит произвёл GitHub
Родитель c6dcbf8f5f d1bf222bb2
Коммит 948d2774ab
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
23 изменённых файлов: 266 добавлений и 51 удалений

3
.github/workflows/playwright.yml поставляемый
Просмотреть файл

@ -53,7 +53,6 @@ jobs:
run: npm run db:migrate
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/blurts
- name: Store Playwright's Version
run: |
PLAYWRIGHT_VERSION=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')
@ -73,7 +72,7 @@ jobs:
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npm run e2e
run: npm run e2e:smoke
env:
E2E_TEST_ENV: ${{ inputs.environment != null && inputs.environment || 'local' }}
E2E_TEST_BASE_URL: ${{ secrets.E2E_TEST_BASE_URL }}

Просмотреть файл

@ -26,6 +26,9 @@ toolbar-app-picker-by-mozilla = Made by { -brand-mozilla }
footer-external-link-faq-label = FAQs
footer-external-link-faq-tooltip = Frequently asked questions
premium-badge-label = { -brand-premium }
premium-cta-label = Upgrade to { -brand-premium }
# Chart summarizing total exposures
# The number inside <nr> will be displayed in a large font,

Просмотреть файл

@ -74,6 +74,10 @@ breach-checklist-link-mozilla-vpn = { -brand-mozilla-vpn }
## Prompts the user for changes when there is a breach detected of password
breach-checklist-pw-header-text = Ενημερώστε τους κωδικούς πρόσβασής σας και ενεργοποιήστε την ταυτοποίηση δύο παραγόντων (2FA).
# The `breached-company-link` tags will be replaced with link tags or stripped if no link is available.
# Variables:
# $passwordManagerLink (string) - a link to the password manager documentation, with { -breach-checklist-link-password-manager } as the label
breach-checklist-pw-body-text = Στις περισσότερες περιπτώσεις, θα συνιστούσαμε να αλλάξετε τον κωδικό πρόσβασής σας στον ιστότοπο της εταιρείας. Ωστόσο, <b>ο ιστότοπός της ενδέχεται να είναι εκτός λειτουργίας ή να περιέχει κακόβουλο περιεχόμενο</b>, επομένως <breached-company-link>επισκεφτείτε τον ιστότοπο</breached-company-link> με προσοχή. Για πρόσθετη προστασία, βεβαιωθείτε ότι χρησιμοποιείτε μοναδικούς κωδικούς πρόσβασης για όλους τους λογαριασμούς, έτσι ώστε τυχόν κωδικοί πρόσβασης που διέρρευσαν να μην μπορούν να χρησιμοποιηθούν για πρόσβαση σε άλλους λογαριασμούς. Το { $passwordManagerLink } μπορεί να σας βοηθήσει να παρακολουθείτε με ασφάλεια όλους τους κωδικούς πρόσβασής σας.
## Prompts the user for changes when there is a breach detected of email
@ -87,6 +91,15 @@ breach-checklist-email-body = Αυτό μπορεί να αποκρύψει τη
# Credit reports list your bill payment history, loans, current debt, and other financial information.
# They show where you work and live and whether you've been sued, arrested, or filed for bankruptcy.
breach-checklist-ssn-header = Παρακολουθήστε την έκθεση πίστωσής σας για λογαριασμούς, δάνεια ή πιστωτικές κάρτες που δεν αναγνωρίζετε.
# A security freeze prevents prospective creditors from accessing your credit file.
# Creditors typically won't offer you credit if they can't access your credit reporting file,
# so a security freeze, also called a credit freeze, prevents you or others from opening accounts in your name.
# This will only be shown to users in the US.
# Variables:
# $equifaxLink (string) - a link to the Equifax website
# $experianLink (string) - a link to the Experian website
# $transUnionLink (string) - a link to the TransUnion website
breach-checklist-ssn-body-2 = Εξετάστε επίσης το ενδεχόμενο να «παγώσετε» την πίστωσή σας στα { $equifaxLink }, { $experianLink } και { $transUnionLink }, ώστε να εμποδίσετε τους απατεώνες από το να ανοίξουν νέους λογαριασμούς στο όνομά σας. Είναι δωρεάν και δεν θα επηρεάσει την πιστωτική σας ικανότητα.
## Prompts the user for changes when there is a breach detected of credit card
@ -96,6 +109,7 @@ breach-checklist-cc-body = Θα πρέπει επίσης να ελέγξετε
## Prompts the user for changes when there is a breach detected of bank account
breach-checklist-bank-header = Ειδοποιήστε αμέσως την τράπεζά σας ότι ο αριθμός λογαριασμού σας έχει παραβιαστεί.
breach-checklist-bank-body = Ενεργώντας ταχύτερα, θα έχετε πιθανώς περισσότερη νομική προστασία, που θα σας βοηθήσει να ανακτήσετε τυχόν απώλειες. Καλό θα ήταν να ελέγξετε και τους λογαριασμούς σας για τυχόν χρεώσεις που δεν αναγνωρίζετε.
## Prompts the user for changes when there is a breach detected of pin
@ -128,6 +142,8 @@ breach-checklist-phone-header-2 = Προστατέψτε τον αριθμό τ
## Prompts the user for changes when there is a breach detected of security questions
breach-checklist-sq-header-text = Ενημερώστε τις ερωτήσεις ασφαλείας σας.
# The `breached-company-link` tags will be replaced with link tags or stripped if no link is available.
breach-checklist-sq-body-text = Στις περισσότερες περιπτώσεις, θα συνιστούσαμε να ενημερώσετε τις ερωτήσεις ασφαλείας σας στον ιστότοπο της εταιρείας. Ωστόσο, <b>ο ιστότοπός της ενδέχεται να είναι εκτός λειτουργίας ή να περιέχει κακόβουλο περιεχόμενο</b>, επομένως <breached-company-link>επισκεφτείτε τον ιστότοπο</breached-company-link> με προσοχή. Για πρόσθετη προστασία, ενημερώστε αυτές τις ερωτήσεις ασφαλείας στους σημαντικούς λογαριασμούς όπου τις έχετε χρησιμοποιήσει και δημιουργήστε μοναδικούς κωδικούς πρόσβασης για όλους τους λογαριασμούς.
## Prompts the user for changes when there is a breach detected of historical password

Просмотреть файл

@ -1,4 +1,5 @@
exposure-landing-hero-heading = Μάθετε εάν έχουν παραβιαστεί οι προσωπικές σας πληροφορίες
exposure-landing-hero-lead = Προστατευτείτε με τα εργαλεία απορρήτου από τους δημιουργούς του { -brand-firefox } από χάκερ και εταιρείες που δημοσιεύουν και πωλούν τα προσωπικά σας δεδομένα. Θα σας ειδοποιήσουμε για τυχόν γνωστές παραβιάσεις δεδομένων, θα βρούμε και θα διαγράψουμε τα εκτεθιμένα στοιχεία σας και θα είμαστε συνεχώς σε επιφυλακή για νέες παραβιάσεις.
exposure-landing-hero-email-label = Διεύθυνση email
exposure-landing-hero-email-placeholder = Εισαγάγετε διεύθυνση email
exposure-landing-hero-cta-label = Έλεγχος για παραβιάσεις

Просмотреть файл

@ -708,6 +708,7 @@ ad-unit-6-before-you-complete = Emoĩmba mboyve pe jehaipy oĩtava, eipuru ñand
## Search Engine Optimization
meta-desc-2 = Ehecha { -brand-fx-monitor } ndive eguerekópa mbaekuaarã ñembogua. Roipytyvõta eikuaa hag̃ua mbaépa ejapóta ha romaẽag̃uíta oimeraẽva ñembogua pyahúre.
## Header
@ -759,6 +760,7 @@ error-page-error-other-copy = Ehaã pyahujey térã ejujey ag̃amieve
## Breach overview page
all-breaches-headline-2 = Opaite ñembogua ohecháva { -brand-fx-monitor }
all-breaches-lead = Rohechapaite umi mbaekuaarã ñembogua roikuaa hag̃ua ne maranduetépa oñembyaikuaárae. Koápe oĩ peteĩ tysýi opaite ñembogua oñemomaranduvaekue rehegua ary 2007 guive.
search-breaches = Ñembyai jeheka
# the kind of user data exposed to hackers in data breach.
exposed-data = Mbaekuaarã imarãkuaáva:

Просмотреть файл

@ -846,14 +846,3 @@ breach-detail-cta-signup = Preverite kraje podatkov
floating-banner-text = Okrepite svojo spletno varnost z novicami, nasveti in posodobitvami { -brand-Mozilla(sklon: "rodilnik") }.
floating-banner-link-label = Prijava
floating-banner-dismiss-button-label = Ne, hvala
## False door test
# Strings used in a banner (false door test) to observe engagement with Monitor premium and gauge user interest.
false-door-test-content-part-one = Nihče ne bi smel imeti možnosti kupiti vaših osebnih podatkov.
false-door-test-content-part-two = Samodejno odstrani podatke s strani, ki jih poskušajo prodajati.
false-door-test-content-part-two-dashboard = Samodejno izbriši podatke s strani, ki jih poskušajo prodajati.
false-door-test-cta = Štejte me zraven
false-door-test-popup-close = Zapri

Просмотреть файл

@ -36,8 +36,8 @@ manage-emails-link = Urejanje e-poštnih sporočil
## Breaches resolved filter
filter-label-unresolved = Nerazrešene kršitve podatkov
filter-label-resolved = Odpravljene kršitve
filter-label-unresolved = Nerazrešene kraje podatkov
filter-label-resolved = Razrešene kraje
## Breaches table
@ -48,14 +48,14 @@ column-detected = ZAZNANO
column-status-badge-resolved = Razrešeno
# “Active” is shown next to a breach if the user still has at least one recommended action to perform in response to the breach.
column-status-badge-active = Aktivno
breaches-resolve-heading = Odpravite to kršitev:
breaches-resolve-heading = Razrešite to krajo:
breaches-none-headline = Ni najdenih kršitev
# Variables:
# $email (String) - An email address that we did not find breaches for, e.g. `someone@example.com`
breaches-none-copy = Dobra novica! Za { $email } niso bile prijavljene znane kraje. To e-pošto bomo še naprej spremljali in vas obvestili, če bo prišlo do novih kraj.
breaches-none-cta-blurb = Ali želite spremljati drugo pošto?
breaches-none-cta-button = Dodaj e-poštni naslov
breaches-all-resolved-headline = Vse kršitve odpravljene
breaches-all-resolved-headline = Vse kraje razrešene
# Variables:
# $email (String) - An email address for which all breaches have been resolved, e.g. `someone@example.com`
breaches-all-resolved-copy = Bravo! Razrešili ste vse kraje podatkov za { $email }. To e-pošto bomo še naprej spremljali in vas obvestili, če bo prišlo do novih kraj.

Просмотреть файл

@ -87,9 +87,9 @@ email-2022-hibp-attribution = Podatke o krajah zagotavlja <a { $hibp-link-attr }
## $email-address (string) - Email address
email-unresolved-heading = Imate nerazrešene kraje podatkov
email-unresolved-subhead = Vaš e-poštni naslov je bil razkrit. <br>Popravite težavo takoj s { -product-name }.
email-unresolved-subhead = Vaš e-poštni naslov je bil razkrit. <br>Odpravite težavo takoj s { -product-name }.
email-is-affected = Vaš e-poštni naslov { $email-address } je odkrit v vsaj eni kraji podatkov
email-more-detail = Prijavite se v { -product-name }, če si želite ogledati več podrobnosti o svojih krajah (vključno s tem, kdaj je do njih prišlo in kateri podatki so bili izpostavljeni), ter izvedeti, kaj morate storiti, če je vaša e-pošta izpostavljena v kraji podatkov.
email-more-detail = Prijavite se v { -product-name }, če si želite ogledati več podrobnosti o krajah vaših podatkov (vključno s tem, kdaj je do njih prišlo in kateri podatki so bili izpostavljeni), ter izvedeti, kaj morate storiti, če je vaša e-pošta izpostavljena v kraji podatkov.
email-breach-status = Trenutno stanje kraje
# table row 1 label
email-monitored = Skupaj nadzorovanih e-poštnih naslovov:
@ -111,8 +111,8 @@ email-verify-simply-click = Preprosto kliknite spodnjo povezavo, da dokončate p
## Variables:
## $email-address (string) - Email address
email-breach-summary = Tukaj je povzetek varnostnih podatkov
email-breach-detected = Rezultati iskanja za vaš račun { $email-address } so odkrili, da je bil vaš e-poštni naslov morda izpostavljen. Priporočamo, da takoj ukrepate in odpravite to kršitev.
email-breach-summary = Tukaj je povzetek kraje podatkov
email-breach-detected = Rezultati iskanja za vaš račun { $email-address } kažejo, da je bil vaš e-poštni naslov morda izpostavljen. Priporočamo, da takoj ukrepate in razrešite to krajo.
email-no-breach-detected = Odlična novica! Odkrili nismo nobene kraje podatkov, ki bi vplivale na vaš e-poštni naslov { $email-address }.
email-dashboard-cta = Pojdi na nadzorno ploščo

Просмотреть файл

@ -1,30 +1,30 @@
exposure-landing-hero-heading = Ugotovite, ali so bili vaši osebni podatki ogroženi
exposure-landing-hero-lead = Ostanite varni z orodji za zasebnost ustvarjalcev { -brand-firefox }a, ki vas ščitijo pred hekerji in podjetji, ki objavljajo in prodajajo vaše osebne podatke. Opozorili vas bomo na morebitne znane kraje podatkov, poiskali in odstranili vaše izpostavljene podatke ter nenehno bdeli na nove izpostavljenosti.
exposure-landing-hero-lead = Ostanite varni z orodji za zasebnost ustvarjalcev { -brand-firefox }a, ki vas ščitijo pred hekerji in podjetji, ki objavljajo in prodajajo vaše osebne podatke. Opozorili vas bomo na morebitne znane kraje podatkov, poiskali in odstranili vaše izpostavljene podatke ter nenehno bdeli nad novimi razkritji.
exposure-landing-hero-email-label = E-poštni naslov
exposure-landing-hero-email-placeholder = Vnesite e-poštni naslov
exposure-landing-hero-cta-label = Preverite kraje podatkov
exposure-landing-result-loading = Nalaganje …
exposure-landing-result-error = Med preverjanjem varnosti je prišlo do napake. Osvežite stran in poskusite znova.
exposure-landing-result-error = Med odkrivanjem kraj podatkov je prišlo do napake. Osvežite stran in poskusite znova.
# Variables:
# $email (string) - The user's email address, used to identify their data in breaches
# $count (number) - Number of data breaches in which the user's data was found
exposure-landing-result-hero-heading =
{ $count ->
[one] <email>{ $email }</email> je bil izpostavljen v <count>1</count> kraji podatkov.
[two] <email>{ $email }</email> je bil izpostavljen <count>{ $count }</count> krajam podatkov.
[few] <email>{ $email }</email> je bil izpostavljen <count>{ $count }</count> krajam podatkov.
*[other] <email>{ $email }</email> je bil izpostavljen <count>{ $count }</count> krajam podatkov.
[two] <email>{ $email }</email> je bil izpostavljen v <count>{ $count }</count> krajama podatkov.
[few] <email>{ $email }</email> je bil izpostavljen v <count>{ $count }</count> krajah podatkov.
*[other] <email>{ $email }</email> je bil izpostavljen v <count>{ $count }</count> krajah podatkov.
}
exposure-landing-result-card-added = Dodana kršitev:
exposure-landing-result-card-added = Dodana kraja:
exposure-landing-result-card-data = Izpostavljeni podatki:
exposure-landing-result-card-nothing = Ni najdenih kršitev
exposure-landing-result-footer-attribution = Podatke o varnostnih razdaljah posredoval <hibp-link>{ -brand-HIBP }</hibp-link>
exposure-landing-result-overflow-hero-lead = Prijavite se za jasne korake za odpravo teh kraj, ogled vseh kraj in stalno spremljanje novih znanih kraj.
exposure-landing-result-overflow-hero-cta-label = Prijavite se in odpravite kraje podatkov
exposure-landing-result-overflow-footer-cta-label = Za ogled vseh se prijavite
exposure-landing-result-some-hero-lead = Prijavite se za jasne korake za odpravo teh kraj, ogled vseh kraj in stalno spremljanje novih znanih kraj.
exposure-landing-result-some-hero-cta-label = Prijavite se in odpravite kraje podatkov
exposure-landing-result-some-footer-cta-label = Prijavite se in odpravite kraje podatkov
exposure-landing-result-none-hero-lead = Dobra novica! Najdenih ni bilo nobenih znanih kršitev. Ostanite varni in se prijavite na opozorila o novih krajah. To e-poštno sporočilo bomo še naprej spremljali in vas obvestili, če se pojavi v novi kraji podatkov.
exposure-landing-result-card-nothing = Ni najdenih kraj
exposure-landing-result-footer-attribution = Podatke o krajah podatkov posredoval <hibp-link>{ -brand-HIBP }</hibp-link>
exposure-landing-result-overflow-hero-lead = Prijavite se za jasna navodila za razrešitev teh kraj, ogled vseh kraj in stalno spremljanje novih znanih kraj.
exposure-landing-result-overflow-hero-cta-label = Prijavite se in razrešite kraje
exposure-landing-result-overflow-footer-cta-label = Prijavite se za ogled vseh
exposure-landing-result-some-hero-lead = Prijavite se za jasna navodila za razrešitev teh kraj, ogled vseh kraj in stalno spremljanje novih znanih kraj.
exposure-landing-result-some-hero-cta-label = Prijavite se in razrešite kraje
exposure-landing-result-some-footer-cta-label = Prijavite se in razrešite kraje
exposure-landing-result-none-hero-lead = Dobra novica! Najdena ni bila nobena znana kraja. Ostanite varni in se prijavite na opozorila o novih krajah. Ta e-poštni naslov bomo še naprej spremljali in vas obvestili, če se pojavi v novi kraji podatkov.
exposure-landing-result-none-hero-cta-label = Prejemajte opozorila o novih krajah podatkov
exposure-landing-result-none-footer-cta-label = Prijavite se na opozorila

Просмотреть файл

@ -2,12 +2,12 @@
rec-ssn-subhead = Preglejte svoja kreditna poročila
# Link title
rec-ssn-cta = Zahtevajte kreditna poročila
rec-ssn = Po zakonu prejmete tri brezplačna poročila o kreditni sposobnosti na leto. Zahteva in pregled ne vplivata na vaše dobroimetje. Poiščite račune, posojila ali kreditne kartice, ki jih ne prepoznate.
rec-ssn = Po zakonu letno prejmete tri brezplačna poročila o dobroimetju. Zahteve in pregledi poročil ne vplivajo na vaše dobroimetje. Poiščite račune, posojila ali kreditne kartice, ki jih ne prepoznate.
# Recommendation subhead
rec-pw-1-subhead = Spremenite svoje geslo
# Link title
rec-pw-1-cta = Spremeni geslo za to stran
rec-pw-1-2 = Naj bo to geslo edinstveno in drugačno od ostalih, ki jih uporabljate. Dobra strategija, ki ji je treba slediti, je združiti dve ali več nepovezanih besed v celotno geslo, ki vključuje številke in simbole.
rec-pw-1-2 = Naj bo to geslo edinstveno in drugačno od ostalih, ki jih uporabljate. Dobra strategija je, da dve ali več nepovezanih besed združite v besedno zvezo, ki ji dodate številke in simbole.
# Recommendation subhead
rec-pw-2-subhead = Posodobite druge prijave z enakim geslom
# Link title

Просмотреть файл

@ -10,9 +10,9 @@ settings-page-title = Nastavitve { -product-short-name(sklon: "rodilnik") }
## Breach alert preferences
settings-alert-preferences-title = Nastavitve opozoril o kršitvah
settings-alert-preferences-title = Nastavitve opozoril o krajah
settings-alert-preferences-option-one = Pošlji opozorila na ogrožen e-poštni naslov
settings-alert-preferences-option-two = Pošlji vsa opozorila o vdorih podatkov na primarni e-poštni naslov
settings-alert-preferences-option-two = Pošlji vsa opozorila o krajah podatkov na primarni e-poštni naslov
## Monitored email addresses
@ -48,8 +48,8 @@ settings-email-number-of-breaches-info =
## Cancel Premium subscription
settings-cancel-premium-subscription-title = Prekliči naročnino na { -brand-premium }
settings-cancel-premium-subscription-info = Vaša naročnina se bo po koncu trenutnega obračunskega obdobja vrnila v brezplačen račun. Rezultati pregleda zaradi zaščite zasebnosti bodo trajno izbrisani, nadzor nad krajami podatkov pa bo na voljo samo za 1 e-poštni naslov.
settings-cancel-premium-subscription-link-label = Prekliči iz svojega { -brand-fx-account }
settings-cancel-premium-subscription-info = Vaša naročnina se bo po koncu trenutnega obračunskega obdobja vrnila v brezplačen račun. Vaši rezultati pregleda zaščite zasebnosti bodo trajno izbrisani, nadzor nad krajami podatkov pa bo na voljo samo za en e-poštni naslov.
settings-cancel-premium-subscription-link-label = Prekliči iz svojega { -brand-fx-account }a
## Deactivate account
@ -66,10 +66,10 @@ settings-send-email-verification-button = Pošlji potrditveno povezavo
## Unsubscribe Dialog Survey
settings-unsubscribe-dialog-title = Žal nam je, da odhajate. <br /> Nam poveste, zakaj odhajate?
settings-unsubscribe-dialog-title = Žal nam je, da odhajate. <br /> Nam poveste, zakaj?
settings-unsubscribe-dialog-info = Vaše izkušnje so za nas pomembne. Vsak odziv preberemo in ga tudi upoštevamo.
settings-unsubscribe-dialog-message-placeholder = Kaj bi lahko bilo bolje?
# $faq_href is the URL for the faq page. HTML tags should not be translated, e.g. `<a>`
settings-unsubscribe-dialog-confirmation = Upoštevajte, da bodo vse vaše storitve { -brand-monitor-premium }a <a { $faq_href }>trajno izbrisane</a> po koncu vašega trenutnega obračunskega obdobja.
settings-unsubscribe-dialog-confirmation = Upoštevajte, da bodo vse vaše storitve { -brand-monitor-premium } <a { $faq_href }>trajno izbrisane</a> po koncu vašega trenutnega obračunskega obdobja.
settings-unsubscribe-dialog-continue = Nadaljuj na preklic
settings-unsubscribe-dialog-cancel = Ni važno, vzemite me nazaj
settings-unsubscribe-dialog-cancel = Premislil sem si, vzemite me nazaj

Просмотреть файл

@ -16,6 +16,7 @@
"test": "jest",
"e2e": "playwright test src/e2e/",
"e2e:debug": "playwright test src/e2e/ --ui",
"e2e:smoke": "playwright test src/e2e/ --grep @smoke",
"functions": "nodemon --exec 'functions-framework --target=app --signature-type=http --source=src/cloud-functions'",
"db:migrate": "node -r dotenv/config node_modules/knex/bin/cli.js migrate:latest --knexfile src/db/knexfile.js",
"db:rollback": "node -r dotenv/config node_modules/knex/bin/cli.js migrate:rollback --knexfile src/db/knexfile.js",

Просмотреть файл

@ -156,9 +156,26 @@ const dashboardSummaryWithScan: DashboardSummary = {
fixedSanitizedExposures: [],
};
const mockSession = {
expires: new Date().toISOString(),
user: { email: "example@example.com" },
};
const userWithPremiumSubscription = {
email: "example@example.com",
fxa: {
locale: "us",
twoFactorAuthentication: false,
metricsEnabled: false,
avatar: "",
avatarDefault: true,
subscriptions: ["monitor"],
},
};
export const DashboardWithScan: Story = {
render: () => (
<Shell l10n={getEnL10nSync()} session={null}>
<Shell l10n={getEnL10nSync()} session={mockSession}>
<DashboardEl
user={{ email: "example@example.com" }}
userBreaches={breachItemArraySample}
@ -176,7 +193,7 @@ export const DashboardWithScan: Story = {
export const DashboardWithScanUserFromUs: Story = {
render: () => (
<Shell l10n={getEnL10nSync()} session={null}>
<Shell l10n={getEnL10nSync()} session={mockSession}>
<DashboardEl
countryCode="us"
user={{ email: "example@example.com" }}
@ -195,7 +212,7 @@ export const DashboardWithScanUserFromUs: Story = {
export const DashboardWithoutScan: Story = {
render: () => (
<Shell l10n={getEnL10nSync()} session={null}>
<Shell l10n={getEnL10nSync()} session={mockSession}>
<DashboardEl
user={{ email: "example@example.com" }}
userBreaches={breachItemArraySample}
@ -213,7 +230,7 @@ export const DashboardWithoutScan: Story = {
export const DashboardEmptyListState: Story = {
render: () => (
<Shell l10n={getEnL10nSync()} session={null}>
<Shell l10n={getEnL10nSync()} session={mockSession}>
<DashboardEl
user={{ email: "example@example.com" }}
userBreaches={breachItemArraySample}
@ -228,3 +245,63 @@ export const DashboardEmptyListState: Story = {
</Shell>
),
};
export const DashboardFreeUser: Story = {
render: () => (
<Shell l10n={getEnL10nSync()} session={mockSession}>
<DashboardEl
countryCode="us"
user={{ email: "example@example.com" }}
userBreaches={breachItemArraySample}
userScannedResults={scannedResultsArraySample}
locale={"en"}
bannerData={dashboardSummaryWithScan}
featureFlagsEnabled={{
FreeBrokerScan: true,
PremiumBrokerRemoval: true,
}}
/>
</Shell>
),
};
export const DashboardPremiumUser: Story = {
render: () => (
<Shell
l10n={getEnL10nSync()}
session={{ ...mockSession, user: userWithPremiumSubscription }}
>
<DashboardEl
countryCode="us"
user={userWithPremiumSubscription}
userBreaches={breachItemArraySample}
userScannedResults={scannedResultsArraySample}
locale={"en"}
bannerData={dashboardSummaryWithScan}
featureFlagsEnabled={{
FreeBrokerScan: true,
PremiumBrokerRemoval: true,
}}
/>
</Shell>
),
};
export const DashboardNoSession: Story = {
render: () => (
<Shell l10n={getEnL10nSync()} session={null}>
<DashboardEl
countryCode="us"
user={{ email: "example@example.com" }}
userBreaches={breachItemArraySample}
userScannedResults={scannedResultsArraySample}
locale={"en"}
bannerData={dashboardSummaryWithScan}
featureFlagsEnabled={{
FreeBrokerScan: true,
PremiumBrokerRemoval: true,
}}
/>
</Shell>
),
};

Просмотреть файл

@ -11,6 +11,9 @@ import Meta, {
DashboardWithScan,
DashboardWithScanUserFromUs,
DashboardWithoutScan,
DashboardFreeUser,
DashboardPremiumUser,
DashboardNoSession,
} from "./Dashboard.stories";
jest.mock("next/navigation", () => ({
@ -62,3 +65,34 @@ it("switches between tab panels", async () => {
expect(tabFixedTrigger.getAttribute("aria-selected")).toBe("true");
expect(tabActionNeededTrigger.getAttribute("aria-selected")).toBe("false");
});
it("shows the premium upgrade cta if the user is not a premium subscriber", () => {
const ComposedDashboard = composeStory(DashboardFreeUser, Meta);
render(<ComposedDashboard />);
// We show a CTA on desktop in the toolbar and in the mobile menu
const premiumCtas = screen.queryAllByRole("button", {
name: "Upgrade to Premium",
});
expect(premiumCtas.length).toBe(2);
});
it("shows the premium badge if the user is a premium subscriber", () => {
const ComposedDashboard = composeStory(DashboardPremiumUser, Meta);
render(<ComposedDashboard />);
// We show a CTA on desktop in the toolbar and in the mobile menu
const premiumBadges = screen.queryAllByText("Premium");
expect(premiumBadges.length).toBe(2);
});
it("shows the premium upgrade cta if there is no user session", () => {
const ComposedDashboard = composeStory(DashboardNoSession, Meta);
render(<ComposedDashboard />);
// We show a CTA on desktop in the toolbar and in the mobile menu
const premiumCtas = screen.queryAllByRole("button", {
name: "Upgrade to Premium",
});
expect(premiumCtas.length).toBe(2);
});

Просмотреть файл

@ -81,9 +81,11 @@
z-index: 1;
.mainMenu {
align-items: center;
display: flex;
background-color: $color-white;
box-shadow: $box-shadow-sm;
flex-direction: column;
ul {
list-style-type: none;
@ -119,6 +121,15 @@
}
}
}
.premiumCta {
margin: $spacing-md;
min-width: $screen-xs;
& > button {
width: 100%;
}
}
}
}

Просмотреть файл

@ -10,6 +10,7 @@ import Image from "next/image";
import { Session } from "next-auth";
import styles from "./MobileShell.module.scss";
import monitorLogo from "../images/monitor-logo.webp";
import PremiumBadge from "../../components/client/PremiumBadge";
import { CloseBigIcon, ListIcon } from "../../components/server/Icons";
import { useL10n } from "../../hooks/l10n";
import { PageLink } from "./PageLink";
@ -98,6 +99,9 @@ export const MobileShell = (props: Props) => {
</a>
</li>
</ul>
<div className={styles.premiumCta}>
<PremiumBadge user={props.session?.user ?? null} />
</div>
</div>
</nav>
<div className={styles.content}>{props.children}</div>

Просмотреть файл

@ -239,6 +239,26 @@ export async function POST(request: NextRequest) {
const result = await getOnerepProfileId(subscriber.id);
const oneRepProfileId = result?.[0]?.["onerep_profile_id"] as number;
console.debug("fxa_subscription_change", JSON.stringify(result));
console.debug("fxa_subscription_change", { oneRepProfileId });
// MNTOR-2103: if one rep profile id doesn't exist in the db, fail silently
if (!oneRepProfileId) {
console.error(
"No OneRep profile Id found, subscriber: ",
subscriber.id
);
captureException(
new Error(`No OneRep profile Id found, subscriber: ${
subscriber.id as string
}\n
Event: ${event}\n
updateFromEvent: ${JSON.stringify(updatedSubscriptionFromEvent)}`)
);
break;
}
if (
updatedSubscriptionFromEvent.isActive &&
updatedSubscriptionFromEvent.capabilities.includes(

Просмотреть файл

@ -0,0 +1,15 @@
@import "../../tokens";
.badge {
align-items: center;
background-color: $color-purple-70;
border-radius: $border-radius-xl;
color: white;
display: flex;
font: $text-body-sm;
font-weight: 600;
gap: $spacing-xs;
justify-content: center;
padding: $spacing-sm $spacing-md $spacing-sm $spacing-sm;
user-select: none;
}

Просмотреть файл

@ -0,0 +1,38 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use client";
import Image from "next/image";
import { Session } from "next-auth";
import styles from "./PremiumBadge.module.scss";
import ShieldIcon from "./assets/shield-icon.svg";
import { useL10n } from "../../hooks/l10n";
import { hasPremium } from "../../functions/universal/user";
import { Button } from "../server/Button";
export type Props = {
user: Session["user"] | null;
};
export default function PremiumBadge({ user }: Props) {
const l10n = useL10n();
/* c8 ignore start */
const onUpgrade = () => {
// TODO: MNTOR-1292: Show premium upsell modal
};
/* c8 ignore end */
return user && hasPremium(user) ? (
<div className={styles.badge}>
<Image src={ShieldIcon} alt="" width="24" height="24" />
{l10n.getString("premium-badge-label")}
</div>
) : (
<Button variant="primary" small onClick={onUpgrade}>
{l10n.getString("premium-cta-label")}
</Button>
);
}

Просмотреть файл

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35082 14.9262C5.43574 12.6128 5.23239 9.68236 5.37494 6.05021L12 4.37528L18.6251 6.05021C18.7676 9.68236 18.5643 12.6128 17.6492 14.9262C16.7382 17.2294 15.0785 19.0243 12 20.2414C8.92155 19.0243 7.26183 17.2294 6.35082 14.9262ZM4.08913 5L12 3L19.9109 5C20.3504 13.2222 19.3835 19 12 21.6667C4.61653 19 3.64964 13.2222 4.08913 5ZM8.04457 8.07143L12 7V17C8.30826 15.5714 7.82482 12.4762 8.04457 8.07143Z" fill="white"/>
</svg>

После

Ширина:  |  Высота:  |  Размер: 574 B

Просмотреть файл

@ -7,6 +7,7 @@ import styles from "./Toolbar.module.scss";
import { UserMenu } from "./UserMenu";
import { Session } from "next-auth";
import { AppPicker } from "./AppPicker";
import PremiumBadge from "../../client/PremiumBadge";
export type Props = {
user: Session["user"] | null;
@ -18,6 +19,7 @@ export const Toolbar = (props: Props) => {
<nav className={styles.toolbar}>
<div className={styles.start}>{props.children}</div>
<div className={styles.end}>
<PremiumBadge user={props.user} />
<AppPicker />
<UserMenu user={props.user} />
</div>

Просмотреть файл

@ -50,6 +50,7 @@
}
&.small {
line-height: 1.5;
padding: $spacing-sm $spacing-md;
}

Просмотреть файл

@ -4,7 +4,7 @@
import { test, expect } from '../fixtures/basePage.js'
test.describe('Authentication flow verification', () => {
test.describe('Authentication flow verification @smoke', () => {
test.beforeEach(async ({ landingPage }) => {
await landingPage.open()
})
@ -26,7 +26,6 @@ test.describe('Authentication flow verification', () => {
// Fill out sign up form
const randomEmail = `${Date.now()}_tstact@restmail.net`
await authPage.signUp(randomEmail, page)
// await page.waitForTimeout(6000)
// assert successful login
await expect(dataBreachPage.dataBreachesHeader).toBeVisible()