aspose_slides_cloud 23.9.0 → 23.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -7
  3. data/README.md +4 -0
  4. data/aspose_slides_cloud.gemspec +0 -1
  5. data/docker-entrypoint.sh +1 -0
  6. data/lib/aspose_slides_cloud/api/slides_async_api.rb +273 -0
  7. data/lib/aspose_slides_cloud/api_client.rb +2 -1
  8. data/lib/aspose_slides_cloud/models/operation.rb +209 -0
  9. data/lib/aspose_slides_cloud/type_registry.rb +1 -0
  10. data/lib/aspose_slides_cloud/version.rb +1 -1
  11. data/lib/aspose_slides_cloud.rb +2 -0
  12. data/spec/api/slides_api_spec.rb +2016 -2016
  13. data/spec/api/slides_async_api_spec.rb +554 -0
  14. data/spec/spec_utils.rb +38 -7
  15. data/spec/use_cases/abstract_class_spec.rb +1 -1
  16. data/spec/use_cases/animation_spec.rb +28 -28
  17. data/spec/use_cases/async_api_spec.rb +82 -0
  18. data/spec/use_cases/chart_spec.rb +51 -51
  19. data/spec/use_cases/comment_spec.rb +17 -17
  20. data/spec/use_cases/create_spec.rb +22 -22
  21. data/spec/use_cases/font_spec.rb +24 -24
  22. data/spec/use_cases/header_footer_spec.rb +9 -9
  23. data/spec/use_cases/hyperlink_spec.rb +10 -10
  24. data/spec/use_cases/image_spec.rb +16 -16
  25. data/spec/use_cases/layout_slide_spec.rb +41 -41
  26. data/spec/use_cases/master_slide_spec.rb +40 -40
  27. data/spec/use_cases/math_spec.rb +15 -15
  28. data/spec/use_cases/merge_spec.rb +15 -15
  29. data/spec/use_cases/notes_slide_spec.rb +39 -39
  30. data/spec/use_cases/nullable_field_spec.rb +7 -7
  31. data/spec/use_cases/paragraph_spec.rb +38 -38
  32. data/spec/use_cases/pipeline_spec.rb +1 -1
  33. data/spec/use_cases/portion_spec.rb +34 -34
  34. data/spec/use_cases/property_spec.rb +38 -38
  35. data/spec/use_cases/section_spec.rb +16 -16
  36. data/spec/use_cases/shape_format_spec.rb +12 -12
  37. data/spec/use_cases/shape_spec.rb +87 -87
  38. data/spec/use_cases/slide_spec.rb +32 -32
  39. data/spec/use_cases/split_spec.rb +12 -12
  40. data/spec/use_cases/table_spec.rb +38 -38
  41. data/spec/use_cases/text_format_spec.rb +4 -4
  42. data/spec/use_cases/text_spec.rb +28 -28
  43. data/spec/use_cases/vba_spec.rb +10 -10
  44. data/spec/use_cases/watermark_spec.rb +36 -36
  45. data/testConfig.json +2 -1
  46. data/testRules.json +7 -0
  47. metadata +8 -24
  48. data/spec/use_cases/convert_spec.rb +0 -199
@@ -27,20 +27,20 @@ describe 'UseCases' do
27
27
  it 'shape add' do
28
28
  folder_name = "TempSlidesSDK"
29
29
  file_name = "test.pptx"
30
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
30
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
31
31
  dto = AsposeSlidesCloud::Shape.new
32
32
  dto.shape_type = 'Callout1'
33
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
33
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
34
34
  expect(result).to be_kind_of(AsposeSlidesCloud::Shape)
35
35
  end
36
36
 
37
37
  it 'shape empty' do
38
38
  folder_name = "TempSlidesSDK"
39
39
  file_name = "test.pptx"
40
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
40
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
41
41
  dto = AsposeSlidesCloud::Shape.new
42
42
  begin
43
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
43
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
44
44
  fail "Shape with undefined type should not have been created"
45
45
  rescue AsposeSlidesCloud::ApiError => e
46
46
  expect(e.code).to eq(400)
@@ -50,10 +50,10 @@ describe 'UseCases' do
50
50
  it 'graphical object empty' do
51
51
  folder_name = "TempSlidesSDK"
52
52
  file_name = "test.pptx"
53
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
53
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
54
54
  dto = AsposeSlidesCloud::GraphicalObject.new
55
55
  begin
56
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
56
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
57
57
  fail "GraphicalObject should not have been created"
58
58
  rescue AsposeSlidesCloud::ApiError => e
59
59
  expect(e.code).to eq(400)
@@ -63,22 +63,22 @@ describe 'UseCases' do
63
63
  it 'picture frame add' do
64
64
  folder_name = "TempSlidesSDK"
65
65
  file_name = "test.pptx"
66
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
66
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
67
67
  dto = AsposeSlidesCloud::PictureFrame.new
68
68
  fill = AsposeSlidesCloud::PictureFill.new
69
69
  fill.base64_data = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXY5g+ffp/AAZTAsWGL27gAAAAAElFTkSuQmCC"
70
70
  dto.picture_fill_format = fill
71
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
71
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
72
72
  expect(result).to be_kind_of(AsposeSlidesCloud::PictureFrame)
73
73
  end
74
74
 
75
75
  it 'picture frame empty' do
76
76
  folder_name = "TempSlidesSDK"
77
77
  file_name = "test.pptx"
78
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
78
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
79
79
  dto = AsposeSlidesCloud::PictureFrame.new
80
80
  begin
81
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
81
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
82
82
  fail "PictureFrame with undefinined data should not have been created"
83
83
  rescue AsposeSlidesCloud::ApiError => e
84
84
  expect(e.code).to eq(400)
@@ -88,20 +88,20 @@ describe 'UseCases' do
88
88
  it 'audio frame add' do
89
89
  folder_name = "TempSlidesSDK"
90
90
  file_name = "test.pptx"
91
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
91
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
92
92
  dto = AsposeSlidesCloud::AudioFrame.new
93
93
  dto.base64_data = "bXAzc2FtcGxl"
94
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
94
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
95
95
  expect(result).to be_kind_of(AsposeSlidesCloud::AudioFrame)
96
96
  end
97
97
 
98
98
  it 'audio frame empty' do
99
99
  folder_name = "TempSlidesSDK"
100
100
  file_name = "test.pptx"
101
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
101
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
102
102
  dto = AsposeSlidesCloud::AudioFrame.new
103
103
  begin
104
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
104
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
105
105
  fail "AudioFrame with undefinined data should not have been created"
106
106
  rescue AsposeSlidesCloud::ApiError => e
107
107
  expect(e.code).to eq(400)
@@ -111,20 +111,20 @@ describe 'UseCases' do
111
111
  it 'video frame add' do
112
112
  folder_name = "TempSlidesSDK"
113
113
  file_name = "test.pptx"
114
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
114
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
115
115
  dto = AsposeSlidesCloud::VideoFrame.new
116
116
  dto.base64_data = "bXAzc2FtcGxl"
117
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
117
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
118
118
  expect(result).to be_kind_of(AsposeSlidesCloud::VideoFrame)
119
119
  end
120
120
 
121
121
  it 'video frame empty' do
122
122
  folder_name = "TempSlidesSDK"
123
123
  file_name = "test.pptx"
124
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
124
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
125
125
  dto = AsposeSlidesCloud::VideoFrame.new
126
126
  begin
127
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
127
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
128
128
  fail "VideoFrame with undefinined data should not have been created"
129
129
  rescue AsposeSlidesCloud::ApiError => e
130
130
  expect(e.code).to eq(400)
@@ -134,10 +134,10 @@ describe 'UseCases' do
134
134
  it 'ole object frame empty' do
135
135
  folder_name = "TempSlidesSDK"
136
136
  file_name = "test.pptx"
137
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
137
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
138
138
  dto = AsposeSlidesCloud::OleObjectFrame.new
139
139
  begin
140
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
140
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
141
141
  fail "OleObjectFrame should not have been created"
142
142
  rescue AsposeSlidesCloud::ApiError => e
143
143
  expect(e.code).to eq(400)
@@ -147,7 +147,7 @@ describe 'UseCases' do
147
147
  it 'smart art add' do
148
148
  folder_name = "TempSlidesSDK"
149
149
  file_name = "test.pptx"
150
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
150
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
151
151
  dto = AsposeSlidesCloud::SmartArt.new
152
152
  dto.x = 0
153
153
  dto.y = 0
@@ -167,26 +167,26 @@ describe 'UseCases' do
167
167
  node2.text = "Second"
168
168
  node2.org_chart_layout = 'Initial'
169
169
  dto.nodes = [ node1, node2 ]
170
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
170
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
171
171
  expect(result).to be_kind_of(AsposeSlidesCloud::SmartArt)
172
172
  end
173
173
 
174
174
  it 'smart art empty' do
175
175
  folder_name = "TempSlidesSDK"
176
176
  file_name = "test.pptx"
177
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
177
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
178
178
  dto = AsposeSlidesCloud::SmartArt.new
179
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
179
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
180
180
  expect(result).to be_kind_of(AsposeSlidesCloud::SmartArt)
181
181
  end
182
182
 
183
183
  it 'chart empty' do
184
184
  folder_name = "TempSlidesSDK"
185
185
  file_name = "test.pptx"
186
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
186
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
187
187
  dto = AsposeSlidesCloud::Chart.new
188
188
  begin
189
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
189
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
190
190
  fail "Chart with undefinined series should not have been created"
191
191
  rescue AsposeSlidesCloud::ApiError => e
192
192
  expect(e.code).to eq(500)
@@ -196,7 +196,7 @@ describe 'UseCases' do
196
196
  it 'table add' do
197
197
  folder_name = "TempSlidesSDK"
198
198
  file_name = "test.pptx"
199
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
199
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
200
200
  dto = AsposeSlidesCloud::Table.new
201
201
  dto.x = 30
202
202
  dto.y = 20
@@ -259,17 +259,17 @@ describe 'UseCases' do
259
259
  dto.columns = [ column1, column2, column3, column4 ]
260
260
  dto.first_row = true
261
261
  dto.horizontal_banding = true
262
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
262
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
263
263
  expect(result).to be_kind_of(AsposeSlidesCloud::Table)
264
264
  end
265
265
 
266
266
  it 'table empty' do
267
267
  folder_name = "TempSlidesSDK"
268
268
  file_name = "test.pptx"
269
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
269
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
270
270
  dto = AsposeSlidesCloud::Table.new
271
271
  begin
272
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
272
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
273
273
  fail "Table with undefinined cell data should not have been created"
274
274
  rescue AsposeSlidesCloud::ApiError => e
275
275
  expect(e.code).to eq(400)
@@ -279,16 +279,16 @@ describe 'UseCases' do
279
279
  it 'group shape empty' do
280
280
  folder_name = "TempSlidesSDK"
281
281
  file_name = "test.pptx"
282
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
282
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
283
283
  dto = AsposeSlidesCloud::GroupShape.new
284
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
284
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
285
285
  expect(result).to be_kind_of(AsposeSlidesCloud::GroupShape)
286
286
  end
287
287
 
288
288
  it 'connector add' do
289
289
  folder_name = "TempSlidesSDK"
290
290
  file_name = "test.pptx"
291
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
291
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
292
292
  dto = AsposeSlidesCloud::Connector.new
293
293
  dto.shape_type = 'BentConnector3'
294
294
  start_shape = AsposeSlidesCloud::ResourceUri.new
@@ -297,16 +297,16 @@ describe 'UseCases' do
297
297
  end_shape = AsposeSlidesCloud::ResourceUri.new
298
298
  end_shape.href = "https://api.aspose.cloud/v3.0/slides/myPresentation.pptx/slides/1/shapes/2"
299
299
  dto.end_shape_connected_to = end_shape
300
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
300
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
301
301
  expect(result).to be_kind_of(AsposeSlidesCloud::Connector)
302
302
  end
303
303
 
304
304
  it 'connector empty' do
305
305
  folder_name = "TempSlidesSDK"
306
306
  file_name = "test.pptx"
307
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
307
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
308
308
  dto = AsposeSlidesCloud::Connector.new
309
- result = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
309
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, 1, dto, nil, nil, "password", folder_name)
310
310
  expect(result).to be_kind_of(AsposeSlidesCloud::Connector)
311
311
  end
312
312
 
@@ -317,19 +317,19 @@ describe 'UseCases' do
317
317
  slide_index = 3
318
318
  shape1_index = 1
319
319
  shape2_index = 2
320
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
321
- shape11 = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape1_index, password, folder_name)
322
- shape12 = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape2_index, password, folder_name)
320
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
321
+ shape11 = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape1_index, password, folder_name)
322
+ shape12 = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape2_index, password, folder_name)
323
323
  expect(shape12.x).not_to be_within(1).of(shape11.x)
324
324
  expect(shape12.y).not_to eq(shape11.y)
325
- AsposeSlidesCloud::SpecUtils.api.align_shapes(file_name, slide_index, "AlignTop", nil, nil, password, folder_name)
326
- shape21 = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape1_index, password, folder_name)
327
- shape22 = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape2_index, password, folder_name)
325
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.align_shapes(file_name, slide_index, "AlignTop", nil, nil, password, folder_name)
326
+ shape21 = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape1_index, password, folder_name)
327
+ shape22 = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape2_index, password, folder_name)
328
328
  expect(shape22.x).not_to be_within(1).of(shape21.x)
329
329
  expect(shape22.y).to be_within(1).of(shape21.y)
330
- AsposeSlidesCloud::SpecUtils.api.align_shapes(file_name, slide_index, "AlignLeft", true, [1, 2], password, folder_name)
331
- shape31 = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape1_index, password, folder_name)
332
- shape32 = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape2_index, password, folder_name)
330
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.align_shapes(file_name, slide_index, "AlignLeft", true, [1, 2], password, folder_name)
331
+ shape31 = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape1_index, password, folder_name)
332
+ shape32 = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape2_index, password, folder_name)
333
333
  expect(shape32.x).to be_within(1).of(shape31.x)
334
334
  expect(shape32.x).to be_within(1).of(0)
335
335
  expect(shape32.y).to be_within(1).of(shape31.y)
@@ -343,19 +343,19 @@ describe 'UseCases' do
343
343
  shape_index = 4
344
344
  sub_shape1 = "1"
345
345
  sub_shape2 = "2"
346
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
347
- shape11 = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape_index, password, folder_name, "", sub_shape1)
348
- shape12 = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape_index, password, folder_name, "", sub_shape2)
346
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
347
+ shape11 = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape_index, password, folder_name, "", sub_shape1)
348
+ shape12 = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape_index, password, folder_name, "", sub_shape2)
349
349
  expect(shape12.x).not_to be_within(1).of(shape11.x)
350
350
  expect(shape12.y).not_to eq(shape11.y)
351
- AsposeSlidesCloud::SpecUtils.api.align_shapes(file_name, slide_index, "AlignTop", nil, nil, password, folder_name, "", "4")
352
- shape21 = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape_index, password, folder_name, "", sub_shape1)
353
- shape22 = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape_index, password, folder_name, "", sub_shape2)
351
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.align_shapes(file_name, slide_index, "AlignTop", nil, nil, password, folder_name, "", "4")
352
+ shape21 = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape_index, password, folder_name, "", sub_shape1)
353
+ shape22 = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape_index, password, folder_name, "", sub_shape2)
354
354
  expect(shape22.x).not_to be_within(1).of(shape21.x)
355
355
  expect(shape22.y).to be_within(1).of(shape21.y)
356
- AsposeSlidesCloud::SpecUtils.api.align_shapes(file_name, slide_index, "AlignLeft", true, [1, 2], password, folder_name, "", "4")
357
- shape31 = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape_index, password, folder_name, "", sub_shape1)
358
- shape32 = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape_index, password, folder_name, "", sub_shape2)
356
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.align_shapes(file_name, slide_index, "AlignLeft", true, [1, 2], password, folder_name, "", "4")
357
+ shape31 = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape_index, password, folder_name, "", sub_shape1)
358
+ shape32 = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape_index, password, folder_name, "", sub_shape2)
359
359
  expect(shape32.x).to be_within(1).of(shape31.x)
360
360
  expect(shape32.x).to be_within(1).of(0)
361
361
  expect(shape32.y).to be_within(1).of(shape31.y)
@@ -364,8 +364,8 @@ describe 'UseCases' do
364
364
  it 'geometry get' do
365
365
  folder_name = "TempSlidesSDK"
366
366
  file_name = "test.pptx"
367
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
368
- paths = AsposeSlidesCloud::SpecUtils.api.get_shape_geometry_path(file_name, 4, 2, "password", folder_name)
367
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
368
+ paths = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape_geometry_path(file_name, 4, 2, "password", folder_name)
369
369
  expect(paths.paths).to be_truthy
370
370
  expect(paths.paths.length).to eq(1)
371
371
  end
@@ -373,7 +373,7 @@ describe 'UseCases' do
373
373
  it 'geometry set' do
374
374
  folder_name = "TempSlidesSDK"
375
375
  file_name = "test.pptx"
376
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
376
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
377
377
  dto = AsposeSlidesCloud::GeometryPaths.new
378
378
  path = AsposeSlidesCloud::GeometryPath.new
379
379
  start_segment = AsposeSlidesCloud::MoveToPathSegment.new
@@ -394,7 +394,7 @@ describe 'UseCases' do
394
394
  end_segment = AsposeSlidesCloud::ClosePathSegment.new
395
395
  path.path_data = [ start_segment, line1, line2, line3, line4, end_segment ]
396
396
  dto.paths = [ path ]
397
- shape = AsposeSlidesCloud::SpecUtils.api.set_shape_geometry_path(file_name, 4, 1, dto, "password", folder_name)
397
+ shape = AsposeSlidesCloud::SpecUtils.testSlidesApi.set_shape_geometry_path(file_name, 4, 1, dto, "password", folder_name)
398
398
  expect(shape).to be_truthy
399
399
  end
400
400
 
@@ -403,14 +403,14 @@ describe 'UseCases' do
403
403
  file_name = "test.pptx"
404
404
  slide_index = 3
405
405
  password = "password"
406
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
406
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
407
407
  dto = AsposeSlidesCloud::ZoomFrame.new
408
408
  dto.x = 20
409
409
  dto.y = 20
410
410
  dto.width = 200
411
411
  dto.height = 100
412
412
  dto.target_slide_index = 2
413
- shape = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, slide_index, dto, nil, nil, password, folder_name)
413
+ shape = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, slide_index, dto, nil, nil, password, folder_name)
414
414
  expect(shape).to be_kind_of(AsposeSlidesCloud::ZoomFrame)
415
415
  expect(shape.target_slide_index).to eq(2)
416
416
  end
@@ -420,14 +420,14 @@ describe 'UseCases' do
420
420
  file_name = "test.pptx"
421
421
  slide_index = 3
422
422
  password = "password"
423
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
423
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
424
424
  dto = AsposeSlidesCloud::SectionZoomFrame.new
425
425
  dto.x = 20
426
426
  dto.y = 20
427
427
  dto.width = 200
428
428
  dto.height = 100
429
429
  dto.target_section_index = 2
430
- shape = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, slide_index, dto, nil, nil, password, folder_name)
430
+ shape = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, slide_index, dto, nil, nil, password, folder_name)
431
431
  expect(shape).to be_kind_of(AsposeSlidesCloud::SectionZoomFrame)
432
432
  expect(shape.target_section_index).to eq(2)
433
433
  end
@@ -437,7 +437,7 @@ describe 'UseCases' do
437
437
  file_name = "test.pptx"
438
438
  slide_index = 3
439
439
  password = "password"
440
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
440
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
441
441
  dto = AsposeSlidesCloud::OleObjectFrame.new
442
442
  dto.x = 20
443
443
  dto.y = 20
@@ -445,7 +445,7 @@ describe 'UseCases' do
445
445
  dto.height = 200
446
446
  dto.link_path = "oleObject.xlsx"
447
447
  dto.object_prog_id = "Excel.Sheet.8"
448
- shape = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, slide_index, dto, nil, nil, password, folder_name)
448
+ shape = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, slide_index, dto, nil, nil, password, folder_name)
449
449
  expect(shape).to be_kind_of(AsposeSlidesCloud::OleObjectFrame)
450
450
  expect(shape.link_path).to eq(dto.link_path)
451
451
  end
@@ -455,7 +455,7 @@ describe 'UseCases' do
455
455
  file_name = "test.pptx"
456
456
  slide_index = 3
457
457
  password = "password"
458
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
458
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
459
459
  source = File.binread("TestData/oleObject.xlsx")
460
460
 
461
461
  dto = AsposeSlidesCloud::OleObjectFrame.new
@@ -466,7 +466,7 @@ describe 'UseCases' do
466
466
  dto.embedded_file_extension = "xlsx"
467
467
  dto.embedded_file_base64_data = Base64.encode64(source)
468
468
 
469
- shape = AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, slide_index, dto, nil, nil, password, folder_name)
469
+ shape = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, slide_index, dto, nil, nil, password, folder_name)
470
470
  expect(shape).to be_kind_of(AsposeSlidesCloud::OleObjectFrame)
471
471
  expect(shape.embedded_file_base64_data).not_to eq(nil)
472
472
  end
@@ -476,12 +476,12 @@ describe 'UseCases' do
476
476
  file_name = "test.pptx"
477
477
  slide_index = 5
478
478
  password = "password"
479
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
480
- shapes = AsposeSlidesCloud::SpecUtils.api.get_shapes(file_name, slide_index, password, folder_name)
479
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
480
+ shapes = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shapes(file_name, slide_index, password, folder_name)
481
481
  expect(shapes.shapes_links.length).to eq(0)
482
482
 
483
483
  group_shape = AsposeSlidesCloud::GroupShape.new
484
- AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, slide_index, group_shape, nil, nil, password, folder_name)
484
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, slide_index, group_shape, nil, nil, password, folder_name)
485
485
 
486
486
  shape1 = AsposeSlidesCloud::Shape.new
487
487
  shape1.shape_type = "Rectangle"
@@ -502,13 +502,13 @@ describe 'UseCases' do
502
502
  shape3.width = 50
503
503
  shape3.height = 50
504
504
 
505
- AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, slide_index, shape1, nil, nil, password, folder_name, "", "1")
506
- AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, slide_index, shape2, nil, nil, password, folder_name, "", "1")
507
- AsposeSlidesCloud::SpecUtils.api.create_shape(file_name, slide_index, shape3, nil, nil, password, folder_name, "", "1")
505
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, slide_index, shape1, nil, nil, password, folder_name, "", "1")
506
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, slide_index, shape2, nil, nil, password, folder_name, "", "1")
507
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.create_shape(file_name, slide_index, shape3, nil, nil, password, folder_name, "", "1")
508
508
 
509
- shapes = AsposeSlidesCloud::SpecUtils.api.get_shapes(file_name, slide_index, password, folder_name)
509
+ shapes = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shapes(file_name, slide_index, password, folder_name)
510
510
  expect(shapes.shapes_links.length).to eq(1)
511
- shapes = AsposeSlidesCloud::SpecUtils.api.get_shapes(file_name, slide_index, password, folder_name, "", nil, "1")
511
+ shapes = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shapes(file_name, slide_index, password, folder_name, "", nil, "1")
512
512
  expect(shapes.shapes_links.length).to eq(3)
513
513
  end
514
514
 
@@ -518,8 +518,8 @@ describe 'UseCases' do
518
518
  slide_index = 5
519
519
  password = "password"
520
520
  source = File.binread("TestData/shapes.svg")
521
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
522
- response = AsposeSlidesCloud::SpecUtils.api.import_shapes_from_svg(file_name, slide_index, source, 50, 50, 300, 300,
521
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
522
+ response = AsposeSlidesCloud::SpecUtils.testSlidesApi.import_shapes_from_svg(file_name, slide_index, source, 50, 50, 300, 300,
523
523
  [1,3,5], false, password, folder_name)
524
524
  expect(response.shapes_links.length).to eq(3)
525
525
  end
@@ -530,8 +530,8 @@ describe 'UseCases' do
530
530
  slide_index = 7
531
531
  smart_art_index = 1
532
532
  new_node_text = "New-root-node"
533
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
534
- response = AsposeSlidesCloud::SpecUtils.api.create_smart_art_node(file_name, slide_index, smart_art_index, nil, new_node_text,
533
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
534
+ response = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_smart_art_node(file_name, slide_index, smart_art_index, nil, new_node_text,
535
535
  nil, "password", folder_name)
536
536
  expect(response.nodes.length).to eq(2)
537
537
  expect(response.nodes[1].text).to eq(new_node_text)
@@ -545,8 +545,8 @@ describe 'UseCases' do
545
545
  sub_node_path = "1"
546
546
  position = 1
547
547
  new_node_text = "New-sub-node"
548
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
549
- response = AsposeSlidesCloud::SpecUtils.api.create_smart_art_node(file_name, slide_index, smart_art_index, sub_node_path,
548
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
549
+ response = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_smart_art_node(file_name, slide_index, smart_art_index, sub_node_path,
550
550
  new_node_text, position, "password", folder_name)
551
551
  expect(response.nodes[0].nodes.length).to eq(5)
552
552
  expect(response.nodes[0].nodes[0].text).to eq(new_node_text)
@@ -559,8 +559,8 @@ describe 'UseCases' do
559
559
  smart_art_index = 1
560
560
  sub_node_path = "1/nodes/1"
561
561
  new_node_text = "New-sub-sub-node"
562
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
563
- response = AsposeSlidesCloud::SpecUtils.api.create_smart_art_node(file_name, slide_index, smart_art_index, sub_node_path,
562
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
563
+ response = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_smart_art_node(file_name, slide_index, smart_art_index, sub_node_path,
564
564
  new_node_text, nil, "password", folder_name)
565
565
  expect(response.nodes[0].nodes[0].nodes.length).to eq(1)
566
566
  expect(response.nodes[0].nodes[0].nodes[0].text).to eq(new_node_text)
@@ -572,8 +572,8 @@ describe 'UseCases' do
572
572
  slide_index = 7
573
573
  smart_art_index = 2
574
574
  node_index = 1
575
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
576
- response = AsposeSlidesCloud::SpecUtils.api.delete_smart_art_node(file_name, slide_index, smart_art_index, node_index, nil,
575
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
576
+ response = AsposeSlidesCloud::SpecUtils.testSlidesApi.delete_smart_art_node(file_name, slide_index, smart_art_index, node_index, nil,
577
577
  "password", folder_name)
578
578
  expect(response.nodes.length).to eq(2)
579
579
  end
@@ -585,8 +585,8 @@ describe 'UseCases' do
585
585
  smart_art_index = 1
586
586
  node_index = 1
587
587
  sub_node_path = "2"
588
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
589
- response = AsposeSlidesCloud::SpecUtils.api.delete_smart_art_node(file_name, slide_index, smart_art_index, node_index,
588
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
589
+ response = AsposeSlidesCloud::SpecUtils.testSlidesApi.delete_smart_art_node(file_name, slide_index, smart_art_index, node_index,
590
590
  sub_node_path, "password", folder_name)
591
591
  expect(response.nodes[0].nodes.length).to eq(3)
592
592
  end
@@ -598,7 +598,7 @@ describe 'UseCases' do
598
598
  shape.height = 200
599
599
  shape.text = "Shape text"
600
600
 
601
- response = AsposeSlidesCloud::SpecUtils.api.download_shape_from_dto(AsposeSlidesCloud::ShapeExportFormat::PNG, shape)
601
+ response = AsposeSlidesCloud::SpecUtils.testSlidesApi.download_shape_from_dto(AsposeSlidesCloud::ShapeExportFormat::PNG, shape)
602
602
  end
603
603
  end
604
604
  end