<commit_before><commit_msg>Add feature test for initial payments page<commit_after># coding: utf-8
require 'rails_helper'

RSpec.feature 'Payments flow', type: :feature do

  include Warden::Test::Helpers
  Warden.test_mode!

  let(:user) { create :user }
  let(:application) { create :application_part_remission, user: user }
  let(:payment) { create :payment, application: application }

  before { login_as user }

  context 'when on the payment flow initial page' do
    before { visit payment_path(id: payment.id) }

    headings = ['Waiting for payment',
                'Process payment',
                'Processing details',
                'Personal details',
                'Application details',
                'Result']

    headings.each do |heading_title|
      it "has a heading titled #{heading_title}" do
        expect(page).to have_content heading_title
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.09523809523809523, 'fraction_numerical': 0.0011074197120708748, 'mean_word_length': 2.8468085106382977, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6021066', 'n_tokens_mistral': 256, 'n_tokens_neox': 243, 'n_words': 79}