<commit_before>require 'spec_helper'
describe 'ApiDocument section tests' do
  it 'ApiDocument | AddElement method' do
    docx = DocBuilderWrapper.new.build_doc_and_parse('asserts/js/docx/smoke/ApiDocument/addelement.js')
    expect(docx.elements[1].character_style_array.first.text).to eq("Number of paragraph elements at this point: \t0\rNumber of paragraph elements after we added a text run: \t1")
  end

  it 'ApiDocument | CreateNumbering method' do
    docx = DocBuilderWrapper.new.build_doc_and_parse('asserts/js/docx/smoke/ApiDocument/createnumbering.js')
    ilvl = 0
    docx.elements[1..docx.elements.size].each do |current_element|
      expect(current_element.numbering.ilvl).to eq(ilvl.to_s)
      current_element.numbering.numbering_properties.ilvls.each do |current_lvl|
        expect(current_lvl.num_format).to eq('bullet')
      end
      ilvl += 1
    end<commit_msg>Fix once more numbering problem<commit_after>require 'spec_helper'
describe 'ApiDocument section tests' do
  it 'ApiDocument | AddElement method' do
    docx = DocBuilderWrapper.new.build_doc_and_parse('asserts/js/docx/smoke/ApiDocument/addelement.js')
    expect(docx.elements[1].character_style_array.first.text).to eq("Number of paragraph elements at this point: \t0\rNumber of paragraph elements after we added a text run: \t1")
  end

  it 'ApiDocument | CreateNumbering method' do
    docx = DocBuilderWrapper.new.build_doc_and_parse('asserts/js/docx/smoke/ApiDocument/createnumbering.js')
    ilvl = 0
    docx.elements[1..docx.elements.size].each do |current_element|
      expect(current_element.numbering.ilvl).to eq(ilvl)
      current_element.numbering.abstruct_numbering.level_list.each do |current_lvl|
        expect(current_lvl.numbering_format.value).to eq('bullet')
      end
      ilvl += 1
    end
{'fraction_non_alphanumeric': 0.10188261351052048, 'fraction_numerical': 0.006644518272425249, 'mean_word_length': 4.394029850746269, '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': '3850673', 'n_tokens_mistral': 596, 'n_tokens_neox': 587, 'n_words': 117}