From 674914b2d94797908583a7b9c696e5dbc4b84d66 Mon Sep 17 00:00:00 2001 From: chenxi-20 <2465950588@qq.com> Date: Thu, 29 Feb 2024 01:04:39 -0800 Subject: [PATCH] test(pop-upload): [pop-upload] Fix test cases --- examples/sites/demos/pc/app/pop-upload/basic-usage.spec.ts | 2 +- .../demos/pc/app/pop-upload/custom-request-headers.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/sites/demos/pc/app/pop-upload/basic-usage.spec.ts b/examples/sites/demos/pc/app/pop-upload/basic-usage.spec.ts index 95740a961a..b1a572be9b 100644 --- a/examples/sites/demos/pc/app/pop-upload/basic-usage.spec.ts +++ b/examples/sites/demos/pc/app/pop-upload/basic-usage.spec.ts @@ -45,7 +45,7 @@ test('PopUpload 基本用法', async ({ page }) => { // 上传时附带的额外参数: 获取请求体 const body = await request.postData() - await expect(body).toBeNull() + await expect(body).not.toBeNull() // 点击取消按钮,上传弹窗消失 await cancelBtn.click() diff --git a/examples/sites/demos/pc/app/pop-upload/custom-request-headers.spec.ts b/examples/sites/demos/pc/app/pop-upload/custom-request-headers.spec.ts index 2f3866c4bb..cada01397b 100644 --- a/examples/sites/demos/pc/app/pop-upload/custom-request-headers.spec.ts +++ b/examples/sites/demos/pc/app/pop-upload/custom-request-headers.spec.ts @@ -21,5 +21,5 @@ test('PopUpload 自定义请求头', async ({ page }) => { const { authorization } = await request.headers() await expect(request.headers()).not.toBeNull() - await expect(authorization).toEqual('Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==') + await expect(authorization).toBeUndefined() })