Skip to content

Commit

Permalink
ref: ApiStroke.ToJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
Yar04ek committed Dec 12, 2023
1 parent 6204da0 commit 4b89e6b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/docx/smoke/api_stroke_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
expect(docx.elements[1].nonempty_runs.first.text).to eq('Class Type = stroke')
end

it 'ApiRGBColor | ToJSON method' do
it 'ApiStroke | ToJSON method' do
docx = builder.build_and_parse('js/docx/smoke/api_stroke/to_json.js')
expect(docx.elements.first.nonempty_runs.first.alternate_content.office2010_content.graphic.data.text_body.elements.first.character_style_array.size).to eq(2)
expect(docx.elements.first.nonempty_runs.first
.alternate_content.office2010_content.graphic.type).to eq(:shape)
expect(docx.elements[1].nonempty_runs.first.text).to include('"type":"stroke"')
json = JSON.parse(docx.elements[1].nonempty_runs.first.text)
stroke = json['graphic']['spPr']['ln']['fill']['fill']['color']['color']['rgba']
expect(stroke['red']).to eq(51)
Expand Down

0 comments on commit 4b89e6b

Please sign in to comment.