From 9edc20f04ae1cdc847a2f709831b8d0e6f4f0eda Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 07 六月 2023 14:47:36 +0800
Subject: [PATCH] 1.生产入库无源单提交测试OK 生产入库开发完成2.MES工单 流程单新增工单编码二维码
---
src/lib/v-gantt-chart/test/gtUtils.test.js | 66 +++++++++++++++++----------------
1 files changed, 34 insertions(+), 32 deletions(-)
diff --git a/src/lib/v-gantt-chart/test/gtUtils.test.js b/src/lib/v-gantt-chart/test/gtUtils.test.js
index 0a1af6f..d1e80ce 100644
--- a/src/lib/v-gantt-chart/test/gtUtils.test.js
+++ b/src/lib/v-gantt-chart/test/gtUtils.test.js
@@ -1,101 +1,103 @@
-var expect = require('chai').expect
+var expect = require('chai').expect;
var func = require('../lib/utils/gtUtils')
import dayjs from 'dayjs'
describe('娴嬭瘯gtUtils.js', function() {
+
describe('娴嬭瘯getWidthAbout2Times鍑芥暟', function() {
it('鐩稿悓鏃堕棿 璁$畻缁撴灉涓�0', function() {
expect(func.getWidthAbout2Times(dayjs(
- '2018-10-10 10:00:00'), dayjs(
+ '2018-10-10 10:00:00'), dayjs(
'2018-10-10 10:00:00'), {
- scale: 60,
- cellWidth: 60
- }))
- .to.be.equal(0)
- })
+ scale: 60,
+ cellWidth: 60
+ }))
+ .to.be.equal(0);
+ });
it('鏁版嵁娴嬭瘯1', function() {
expect(func.getWidthAbout2Times(dayjs(
'2018-10-10 10:00:00'), dayjs(
- '2018-10-10 11:00:00'), {
+ '2018-10-10 11:00:00'), {
scale: 60,
cellWidth: 60
})).to.equal(60)
- })
+ });
it('鏁版嵁娴嬭瘯2', function() {
expect(func.getWidthAbout2Times(dayjs(
'2018-10-10 00:00:00'), dayjs(
- '2018-10-10 01:10:00'), {
+ '2018-10-10 01:10:00'), {
scale: 1,
cellWidth: 1
})).to.equal(70)
- })
+ });
it('鏁版嵁娴嬭瘯3', function() {
expect(func.getWidthAbout2Times(dayjs(
'2018-10-11 10:00:00'), dayjs(
- '2018-10-11 00:00:00'), {
+ '2018-10-11 00:00:00'), {
scale: 10,
cellWidth: 10
})).to.equal(-600)
- })
+ });
it('鏁版嵁娴嬭瘯4', function() {
expect(func.getWidthAbout2Times(dayjs(
'2018-10-10 00:00:00'), dayjs(
- '2018-10-10 10:00:00'), {
+ '2018-10-10 10:00:00'), {
scale: 10,
cellWidth: 60
})).to.equal(3600)
- })
- })
+ });
+ });
describe('娴嬭瘯getPositonOffset鍑芥暟', function() {
it('鐩稿悓鏃堕棿 璁$畻缁撴灉涓�0', function() {
expect(func.getPositonOffset(dayjs(
- '2018-10-10 10:00:00'), dayjs(
+ '2018-10-10 10:00:00'), dayjs(
'2018-10-10 10:00:00'), {
- scale: 60,
- cellWidth: 60
- }))
- .to.be.equal(0)
- })
+ scale: 60,
+ cellWidth: 60
+ }))
+ .to.be.equal(0);
+ });
it('鏁版嵁娴嬭瘯1', function() {
expect(func.getPositonOffset(dayjs(
'2018-10-10 10:00:00'), dayjs(
- '2018-10-10 11:00:00'), {
+ '2018-10-10 11:00:00'), {
scale: 60,
cellWidth: 60
})).to.equal(-60)
- })
+ });
it('鏁版嵁娴嬭瘯2', function() {
expect(func.getPositonOffset(dayjs(
'2018-10-10 00:00:00'), dayjs(
- '2018-10-10 01:10:00'), {
+ '2018-10-10 01:10:00'), {
scale: 60,
cellWidth: 60
})).to.equal(-70)
- })
+ });
it('鏁版嵁娴嬭瘯3', function() {
expect(func.getPositonOffset(dayjs(
'2018-10-11 10:00:00'), dayjs(
- '2018-10-11 00:00:00'), {
+ '2018-10-11 00:00:00'), {
scale: 60,
cellWidth: 60
})).to.equal(+600)
- })
+ });
it('鏁版嵁娴嬭瘯4', function() {
expect(func.getPositonOffset(dayjs(
'2018-10-10 00:00:00'), dayjs(
- '2018-10-10 10:00:00'), {
+ '2018-10-10 10:00:00'), {
scale: 60,
cellWidth: 60
})).to.equal(-600)
- })
- })
-})
+ });
+ });
+
+});
\ No newline at end of file
--
Gitblit v1.9.3