<commit_before>const { investments } = require('../../../../../src/lib/urls')
const fixtures = require('../../fixtures')
const selectors = require('../../../../selectors')

describe('LEP add Investment Project interaction', () => {
  context('The browser URL has updated', () => {
    before(() => {
      cy.visit(
        investments.projects.interactions.index(
          fixtures.investmentProject.newZoo.id
        )
      )
    })
    it('should have the correct url', () => {
      cy.get('[data-auto-id="Add interaction"]')
        .click()
        .location('pathname')
        .should(
          'eq',
          investments.projects.interactions.createType(
            fixtures.investmentProject.newZoo.id,
            'investment',
            'interaction'
          )
        )
    })
  })

  context('LEP completes the form and clicks "Add interaction"', () => {
    before(() => {
      cy.server().route('POST', '/api-proxy/v3/interaction').as('post')

      cy.visit(
        investments.projects.interactions.createType(
          fixtures.investmentProject.newZoo.id,<commit_msg>Patch LEP test still using old v3 endpoint<commit_after>const { investments } = require('../../../../../src/lib/urls')
const fixtures = require('../../fixtures')
const selectors = require('../../../../selectors')

describe('LEP add Investment Project interaction', () => {
  context('The browser URL has updated', () => {
    before(() => {
      cy.visit(
        investments.projects.interactions.index(
          fixtures.investmentProject.newZoo.id
        )
      )
    })
    it('should have the correct url', () => {
      cy.get('[data-auto-id="Add interaction"]')
        .click()
        .location('pathname')
        .should(
          'eq',
          investments.projects.interactions.createType(
            fixtures.investmentProject.newZoo.id,
            'investment',
            'interaction'
          )
        )
    })
  })

  context('LEP completes the form and clicks "Add interaction"', () => {
    before(() => {
      cy.server().route('POST', '/api-proxy/v4/interaction').as('post')

      cy.visit(
        investments.projects.interactions.createType(
          fixtures.investmentProject.newZoo.id,
{'fraction_non_alphanumeric': 0.1724292770543332, 'fraction_numerical': 0.001347103726986978, 'mean_word_length': 2.164772727272727, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6813443', 'n_tokens_mistral': 644, 'n_tokens_neox': 629, 'n_words': 110}