Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Adapt test to new schema && do not show "rtl" direction on placeholders

Henriette Dinger712f4c67491a
diff --git a/app/assets/stylesheets/openproject/_generic.sass b/app/assets/stylesheets/openproject/_generic.sass
index 936c637e01c..6ff3713a650 100644
--- a/app/assets/stylesheets/openproject/_generic.sass
+++ b/app/assets/stylesheets/openproject/_generic.sass
@@ -88,6 +88,8 @@
font-size: 12px
.-rtl
direction: rtl
+ .-placeholder &
+ direction: ltr
.drop-zone.-dragged-over
background-color: #eaeaea60
diff --git a/frontend/src/app/modules/fields/edit/field-types/formattable-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/formattable-edit-field.component.ts
index ac7f942d6b8..acfea0ec8b2 100644
--- a/frontend/src/app/modules/fields/edit/field-types/formattable-edit-field.component.ts
+++ b/frontend/src/app/modules/fields/edit/field-types/formattable-edit-field.component.ts
@@ -117,7 +117,7 @@ export class FormattableEditFieldComponent extends EditFieldComponent implements
resource: this.resource,
macros: 'none' as 'none',
previewContext: this.previewContext,
- options: { rtl: this.schema.options.rtl }
+ options: { rtl: this.schema.options && this.schema.options.rtl }
};
}
diff --git a/spec/lib/api/v3/work_packages/schema/work_package_sums_schema_representer_spec.rb b/spec/lib/api/v3/work_packages/schema/work_package_sums_schema_representer_spec.rb
index b76d2185c1b..984d338b25a 100644
--- a/spec/lib/api/v3/work_packages/schema/work_package_sums_schema_representer_spec.rb
+++ b/spec/lib/api/v3/work_packages/schema/work_package_sums_schema_representer_spec.rb
@@ -68,7 +68,8 @@ describe ::API::V3::WorkPackages::Schema::WorkPackageSumsSchemaRepresenter do
'visibility': 'default',
'required': false,
'hasDefault': false,
- 'writable': false }
+ 'writable': false,
+ 'options': {} }
expect(subject).to be_json_eql(expected.to_json).at_path('estimatedTime')
end
end
@@ -93,7 +94,8 @@ describe ::API::V3::WorkPackages::Schema::WorkPackageSumsSchemaRepresenter do
'visibility': 'default',
'required': false,
'hasDefault': false,
- 'writable': false }
+ 'writable': false,
+ 'options': {} }
expect(subject).to be_json_eql(expected.to_json).at_path("customField#{custom_field.id}")
end
end
diff --git a/spec/requests/api/v3/work_packages/work_packages_schemas_resource_spec.rb b/spec/requests/api/v3/work_packages/work_packages_schemas_resource_spec.rb
index 571cf5be97e..bbbe7e0fef5 100644
--- a/spec/requests/api/v3/work_packages/work_packages_schemas_resource_spec.rb
+++ b/spec/requests/api/v3/work_packages/work_packages_schemas_resource_spec.rb
@@ -209,7 +209,8 @@ describe API::V3::WorkPackages::Schema::WorkPackageSchemasAPI, type: :request do
'visibility': 'default',
'required': false,
'hasDefault': false,
- 'writable': false }
+ 'writable': false,
+ 'options': {} }
expect(subject.body).to be_json_eql(expected.to_json).at_path('estimatedTime')
end
end