mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-27 02:51:57 +02:00
Prevent browser translation of stuff that shouldn't be translated in IDE page GitOrigin-RevId: 96a75b51c3c8efc4cbcec7eb17d9e331a03e2c96
23 lines
592 B
JavaScript
23 lines
592 B
JavaScript
import { expect } from 'chai'
|
|
|
|
export default {
|
|
requireLogin: {
|
|
json(response, body) {
|
|
expect(response.statusCode).to.equal(401)
|
|
expect(body).to.equal('Unauthorized')
|
|
expect(response.headers['www-authenticate']).to.equal('OverleafLogin')
|
|
},
|
|
},
|
|
|
|
restricted: {
|
|
html(response, body) {
|
|
expect(response.statusCode).to.equal(403)
|
|
expect(body).to.match(/<head><title translate="no">Restricted/)
|
|
},
|
|
json(response, body) {
|
|
expect(response.statusCode).to.equal(403)
|
|
expect(body).to.deep.equal({ message: 'restricted' })
|
|
},
|
|
},
|
|
}
|