From 46a0985f554d2b42198a16d05e52e74ab957583b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com>
Date: Thu, 23 Feb 2023 10:54:18 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=20=E4=BF=AE=E5=A4=8Dnpm-event=E5=8D=95?=
=?UTF-8?q?=E6=B5=8Bid=E6=A0=B9=E6=8D=AE=E6=97=B6=E9=97=B4=E5=91=BD?=
=?UTF-8?q?=E5=90=8D=E5=8F=AF=E8=83=BD=E4=BC=9A=E5=AF=BC=E8=87=B4=E6=8A=A5?=
=?UTF-8?q?=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/charts2/charts/npm/NpmRecentEvents.vue | 3 ++-
test/views/charts2/charts/npm/NpmRecentEvents.test.js | 10 +++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/views/charts2/charts/npm/NpmRecentEvents.vue b/src/views/charts2/charts/npm/NpmRecentEvents.vue
index 78509ca8..581105f0 100644
--- a/src/views/charts2/charts/npm/NpmRecentEvents.vue
+++ b/src/views/charts2/charts/npm/NpmRecentEvents.vue
@@ -29,7 +29,7 @@
{{scope.row[item.prop]}}
- {{scope.row[item.prop]}}
+ {{scope.row[item.prop]}}
-
@@ -125,6 +125,7 @@ export default {
}
})
this.tableData = res.data.result
+ console.log('打印tableData', this.tableData)
} else {
// this.isNoData = true
this.showError = true
diff --git a/test/views/charts2/charts/npm/NpmRecentEvents.test.js b/test/views/charts2/charts/npm/NpmRecentEvents.test.js
index 045a48d1..f8cd7b4a 100644
--- a/test/views/charts2/charts/npm/NpmRecentEvents.test.js
+++ b/test/views/charts2/charts/npm/NpmRecentEvents.test.js
@@ -144,11 +144,11 @@ describe('views/charts2/charts/npm/NpmRecentEvents.vue测试', () => {
expect(eventType3.text()).toEqual('http error')
expect(eventType4.text()).toEqual('dns error')
- const startTime0 = wrapper.get('[test-id="startTime-2023-01-04T11:25:00+08:00-0"]')
- const startTime1 = wrapper.get('[test-id="startTime-2023-01-04T00:30:00+08:00-1"]')
- const startTime2 = wrapper.get('[test-id="startTime-2023-01-03T13:05:00+08:00-2"]')
- const startTime3 = wrapper.get('[test-id="startTime-2023-01-03T12:35:00+08:00-3"]')
- const startTime4 = wrapper.get('[test-id="startTime-2023-01-03T12:15:00+08:00-4"]')
+ const startTime0 = wrapper.get('[test-id="startTime-0"]')
+ const startTime1 = wrapper.get('[test-id="startTime-1"]')
+ const startTime2 = wrapper.get('[test-id="startTime-2"]')
+ const startTime3 = wrapper.get('[test-id="startTime-3"]')
+ const startTime4 = wrapper.get('[test-id="startTime-4"]')
expect(startTime0.text()).toEqual('2023-01-04T11:25:00+08:00')
expect(startTime1.text()).toEqual('2023-01-04T00:30:00+08:00')