aboutsummaryrefslogtreecommitdiffstats
path: root/.cypress/cypress/integration/regressions.js
diff options
context:
space:
mode:
Diffstat (limited to '.cypress/cypress/integration/regressions.js')
-rw-r--r--.cypress/cypress/integration/regressions.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/.cypress/cypress/integration/regressions.js b/.cypress/cypress/integration/regressions.js
index 00e92f5ad..547fc469b 100644
--- a/.cypress/cypress/integration/regressions.js
+++ b/.cypress/cypress/integration/regressions.js
@@ -25,4 +25,21 @@ describe('Regression tests', function() {
cy.get('#loading-indicator').should('be.hidden');
cy.get('#map_box image').should('be.visible');
});
+ it('Does not escape HTML entities in the title', function() {
+ cy.server();
+ cy.route('/around\?ajax*').as('update-results');
+ cy.request({
+ method: 'POST',
+ url: '/auth?r=/',
+ form: true,
+ body: { username: 'cs@example.org', password_sign_in: 'password' }
+ });
+ cy.visit('/report/1/moderate');
+ cy.get('[name=problem_title]').clear().type('M&S "brill" says <glob>').parents('form').submit();
+ cy.title().should('contain', 'M&S "brill" says <glob>');
+ cy.contains('Problems nearby').click();
+ cy.wait('@update-results');
+ cy.get('#map_sidebar').contains('M&S').click();
+ cy.title().should('contain', 'M&S "brill" says <glob>');
+ });
});