aspose_slides_cloud 23.6.0 → 23.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -98,5 +98,26 @@ describe 'UseCases' do
98
98
  png_result = AsposeSlidesCloud::SpecUtils.api.download_image_online(source, slide_index, 'png', password)
99
99
  expect(png_result.size).not_to eq(default_result.size)
100
100
  end
101
+
102
+ it 'replace image' do
103
+ folder_name = "TempSlidesSDK"
104
+ file_name = "test.pptx"
105
+ image_index = 1
106
+ password = "password"
107
+ AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
108
+
109
+ image = File.binread("TestData/watermark.png")
110
+ AsposeSlidesCloud::SpecUtils.api.replace_image(file_name, image_index, image, password, folder_name)
111
+ end
112
+
113
+ it 'replace image request' do
114
+ image_index = 1
115
+ password = "password"
116
+
117
+ file = File.binread("TestData/test.pptx")
118
+ image = File.binread("TestData/watermark.png")
119
+ response = AsposeSlidesCloud::SpecUtils.api.replace_image_online(file, image_index, image, password)
120
+ expect(response.size).not_to eq(0)
121
+ end
101
122
  end
102
123
  end
@@ -71,6 +71,40 @@ describe 'UseCases' do
71
71
  AsposeSlidesCloud::SpecUtils.api.replace_slide_text_online(source, slide_index, old_value, new_value, true, password)
72
72
  end
73
73
 
74
+ it 'replace text formatting' do
75
+ folder_name = "TempSlidesSDK"
76
+ file_name = "test.pptx"
77
+ password = "password"
78
+ slide_index = 1
79
+ shape_index = 1
80
+ paragraph_index = 1
81
+ portion_index = 1
82
+ old_text = "banana"
83
+ new_text = "orange"
84
+ color = "#FFFFA500"
85
+
86
+ portion = AsposeSlidesCloud::Portion.new
87
+ portion.text = old_text
88
+
89
+ portion_format = AsposeSlidesCloud::PortionFormat.new
90
+ portion_format.font_color = color
91
+
92
+ AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
93
+ AsposeSlidesCloud::SpecUtils.api.create_portion(file_name, slide_index, shape_index, paragraph_index, portion, portion_index, password, folder_name)
94
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting(file_name, old_text, new_text, portion_format, nil, password, folder_name)
95
+ updated_portion = AsposeSlidesCloud::SpecUtils.api.get_portion(file_name, slide_index, shape_index, paragraph_index, portion_index, password, folder_name)
96
+ expect(updated_portion.text).to eq(new_text)
97
+ expect(updated_portion.font_color).to eq(color)
98
+ end
99
+
100
+ it 'replace text formatting online' do
101
+ password = "password"
102
+ source = File.binread("TestData/test.pptx")
103
+ portion_format = AsposeSlidesCloud::PortionFormat.new
104
+ portion_format.font_color = "#FFFFA500"
105
+ AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online(source, "banana", "orange", portion_format, nil, password)
106
+ end
107
+
74
108
  it "highlight shape text" do
75
109
  folder_name = "TempSlidesSDK"
76
110
  file_name = "test.pptx"
data/testRules.json CHANGED
@@ -61,6 +61,7 @@
61
61
  { "Value": { "Presentations": [{ "Path": "file1", "Password": "password" }, { "Path": "file2" }] }, "Type": "OrderedMergeRequest", "Language": "Go" },
62
62
  { "Value": { "Presentations": [{ "Path": "file1", "Password": "password" }, { "Path": "file2" }] }, "Type": "OrderedMergeRequest", "Language": "Ruby" },
63
63
  { "Value": { "Presentations": [{ "Path": "file1", "Password": "password" }, { "Path": "file2" }] }, "Type": "OrderedMergeRequest", "Language": "Perl" },
64
+ { "Value": { "Presentations": [{ "Path": "file1", "Password": "password" }, { "Path": "file2" }] }, "Type": "OrderedMergeRequest", "Language": "C++" },
64
65
  { "Value": { "Name": "testModule001", "SourceCode": "Test" }, "Type": "VbaModule" },
65
66
  { "Value": {}, "Type": "OrderedMergeRequest", "Method": "OrderedMerge" },
66
67
  { "Value": { "paths": [ { "pathData": [ { "type": "MoveTo" } ] } ] }, "Type": "GeometryPaths" },
@@ -205,7 +206,6 @@
205
206
  { "Message": "Error processing presentation ", "Parameter": "Files" },
206
207
  { "Message": "Image expected", "Parameter": "Image" },
207
208
  { "Message": " required parameter", "Type": "model" },
208
- { "Message": " DTO expected", "Type": "VbaModule", "Method": "UpdateVbaModule" },
209
209
  { "Message": "Failed to load the presentation", "Parameter": "Request", "Method": "/Merge.*Online/" },
210
210
  { "Message": "Invalid Request", "Parameter": "VersionId" },
211
211
  { "Message": "AmazonS3 Storage exception", "Parameter": "VersionId", "Method": "ObjectExists" },
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspose_slides_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 23.6.0
4
+ version: 23.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Putrov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-30 00:00:00.000000000 Z
11
+ date: 2023-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday