diff --git a/js/docx/smoke/api_rgb_color/to_json.js b/js/docx/smoke/api_rgb_color/to_json.js index 4daaa403..84095a9c 100644 --- a/js/docx/smoke/api_rgb_color/to_json.js +++ b/js/docx/smoke/api_rgb_color/to_json.js @@ -18,7 +18,7 @@ builder.CreateFile("docx"); oDocument.Push(oParagraph1); let oParagraph2 = Api.CreateParagraph(); let oGs1 = Api.CreateGradientStop(oRGBColor, 0); - let oGs2 = Api.CreateGradientStop(oRGBColor, 10); + let oGs2 = Api.CreateGradientStop(255, 213, 191, 100000); let oFill = Api.CreateLinearGradientFill([oGs1, oGs2], 5400000); let oStroke = Api.CreateStroke(0, Api.CreateNoFill()); let oDrawing = Api.CreateShape("rect", 5930900, 395605, oFill, oStroke); diff --git a/spec/docx/smoke/api_rgb_color_spec.rb b/spec/docx/smoke/api_rgb_color_spec.rb index 093ebb78..15af123e 100644 --- a/spec/docx/smoke/api_rgb_color_spec.rb +++ b/spec/docx/smoke/api_rgb_color_spec.rb @@ -9,10 +9,10 @@ it 'ApiRGBColor | ToJSON method' do docx = builder.build_and_parse('js/docx/smoke/api_rgb_color/to_json.js') - rgba = JSON.parse(docx.elements[1].nonempty_runs.first.text) - lst = rgba['graphic']['spPr']['fill']['fill']['gsLst'][1]['color']['color']['rgba'] - expect(lst['red']).to eq(255) - expect(lst['green']).to eq(111) - expect(lst['blue']).to eq(61) + json = JSON.parse(docx.elements[1].nonempty_runs.first.text) + rgba = json['graphic']['spPr']['fill']['fill']['gsLst'][0]['color']['color']['rgba'] + expect(rgba['red']).to eq(255) + expect(rgba['green']).to eq(111) + expect(rgba['blue']).to eq(61) end end