aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/vnfs/build-artifacts
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-08-03 15:43:05 +0530
committerTakamune Cho <tc012c@att.com>2018-08-03 21:02:10 +0000
commit5e57bd7a7093cd1ac6a0cfc026c0103fd8afc149 (patch)
tree99138fc885d273a8be515ff153286afa39e5422c /src/app/vnfs/build-artifacts
parent8164657cbb6fbd9baa40b66d6c952056ae853da9 (diff)
reference-data-form - added test case
added test case to cover fileChange() method in reference-data-form spec file. Issue-ID: APPC-1064 Change-Id: Id27e82a648e9bb578035bc90505e15b12a0c8654 Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'src/app/vnfs/build-artifacts')
-rw-r--r--src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts
index fbf6d72..f39f08b 100644
--- a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts
+++ b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts
@@ -1005,4 +1005,16 @@ describe('ReferenceDataformComponent', () => {
let evnt = {target: {files: [file]}};
component.upload(evnt);
});
+
+ it('Should validatte fileChange method if file type is xml', async(() => {
+ let reader = new FileReader();
+ let content = "{data : 'Hello World'}";
+ let data = new Blob([content], { type: 'text/plain' });
+ let arrayOfBlob = new Array<Blob>();
+ arrayOfBlob.push(data);
+ let file = new File(arrayOfBlob, "Mock.XLS");
+ let input = {target: {files: [file]}};
+
+ component.fileChange(input);
+ }));
}); \ No newline at end of file