diff --git a/pages/API/request/request.test.js b/pages/API/request/request.test.js
index 2e3f62dbcdd757b3e2c8e415b9f7b940ef317943..276cea3e13055826c7b16be5f89eacc6d8e556a9 100644
--- a/pages/API/request/request.test.js
+++ b/pages/API/request/request.test.js
@@ -180,4 +180,13 @@ describe('ExtApi-Request', () => {
expect(res).toBe(true)
})
}
+
+ if(process.env.uniTestPlatformInfo.toLocaleLowerCase().startsWith('android')){
+ it('Check Respone string generics when status is 404', async () => {
+ res = await page.callMethod('jest_respone_with_404_and_string_generics')
+ await page.waitFor(2000);
+ res = await page.data('jest_result');
+ expect(res).toBe(true)
+ })
+ }
});
diff --git a/pages/API/request/request.uvue b/pages/API/request/request.uvue
index e5391549df33fdd9face7ab554b04e5b305ddc0d..7ef3e6a8cab5984343301af46355aff199a0e4aa 100644
--- a/pages/API/request/request.uvue
+++ b/pages/API/request/request.uvue
@@ -9,7 +9,7 @@
请求方式 : {{method}}
-
+
@@ -419,6 +419,22 @@
this.jest_result = false;
},
});
+ },
+ jest_respone_with_404_and_string_generics(){
+ uni.request({
+ url: this.host + "/api/http/statusCode/404",
+ method: "GET",
+ timeout: null,
+ sslVerify: false,
+ withCredentials: false,
+ firstIpv4: false,
+ success: (res : RequestSuccess) => {
+ this.jest_result = true;
+ },
+ fail: () => {
+ this.jest_result = false;
+ },
+ });
}
}
}