Merge pull request #6886 from overleaf/jpa-less-verbose-ci

[web] skip HIBP check for all tests but the HIBP specific ones

GitOrigin-RevId: 714e69cc2220e7edcef875d6be487ded571cd977
This commit is contained in:
Jessica Lawshe 2022-02-24 08:43:37 -06:00 committed by Copybot
parent f1272166f8
commit 1c62f82f9c
2 changed files with 9 additions and 1 deletions

View file

@ -35,7 +35,7 @@ module.exports = {
},
haveIBeenPwned: {
enabled: true,
enabled: false,
url: 'http://localhost:1337',
},
},

View file

@ -1,3 +1,4 @@
const Settings = require('@overleaf/settings')
const { expect } = require('chai')
const User = require('./helpers/User').promises
const MockHaveIBeenPwnedApiClass = require('./mocks/MockHaveIBeenPwnedApi')
@ -60,6 +61,13 @@ async function resetPassword(password) {
}
describe('HaveIBeenPwnedApi', function () {
before(function () {
Settings.apis.haveIBeenPwned.enabled = true
})
after(function () {
Settings.apis.haveIBeenPwned.enabled = false
})
describe('login with weak password', function () {
beforeEach(function () {
user = new User()