mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Fix flaky unit test - remove 'Markup' object in data (#5313)
example of the failed test https://travis-ci.org/apache/incubator-superset/jobs/397891630
This commit is contained in:
committed by
Grace Guo
parent
885d7791a0
commit
16d26336c4
@@ -56,9 +56,7 @@ export function fetchAllSlices(userId) {
|
||||
description: slice.description,
|
||||
description_markdown: slice.description_markeddown,
|
||||
viz_type: slice.viz_type,
|
||||
modified: slice.modified
|
||||
? slice.modified.replace(/<[^>]*>/g, '')
|
||||
: '',
|
||||
modified: slice.modified,
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
@@ -54,9 +54,7 @@ function AddSliceDragPreview({ dragItem, slices, isDragging, currentOffset }) {
|
||||
transform: `translate(${currentOffset.x}px, ${currentOffset.y}px)`,
|
||||
}}
|
||||
sliceName={slice.slice_name}
|
||||
lastModified={
|
||||
slice.modified ? slice.modified.replace(/<[^>]*>/g, '') : ''
|
||||
}
|
||||
lastModified={slice.modified}
|
||||
visType={slice.viz_type}
|
||||
datasourceLink={slice.datasource_link}
|
||||
/>
|
||||
|
||||
@@ -92,7 +92,7 @@ export default function(bootstrapData) {
|
||||
datasource: slice.form_data.datasource,
|
||||
description: slice.description,
|
||||
description_markeddown: slice.description_markeddown,
|
||||
modified: slice.modified ? slice.modified.replace(/<[^>]*>/g, '') : '',
|
||||
modified: slice.modified,
|
||||
changed_on: new Date(slice.changed_on).getTime(),
|
||||
};
|
||||
|
||||
|
||||
@@ -282,8 +282,7 @@ class AuditMixinNullable(AuditMixin):
|
||||
|
||||
@renders('modified')
|
||||
def modified(self):
|
||||
s = humanize.naturaltime(datetime.now() - self.changed_on)
|
||||
return Markup('<span class="no-wrap">{}</span>'.format(s))
|
||||
return humanize.naturaltime(datetime.now() - self.changed_on)
|
||||
|
||||
@property
|
||||
def icons(self):
|
||||
|
||||
Reference in New Issue
Block a user