Skip to content

Commit

Permalink
Merge pull request #15597 from RogueTea/fix-file-size-unit-tests
Browse files Browse the repository at this point in the history
FileUpload: fix unit tests
  • Loading branch information
cetincakiroglu authored May 30, 2024
2 parents 5a42a3f + 7e7a219 commit 8008a84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/components/fileupload/fileupload.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('FileUpload', () => {
const fileuploadEl = fixture.debugElement.query(By.css('div'));
expect(fileuploadEl).toBeTruthy();
expect(fileuploadEl.nativeElement.className).toContain('p-fileupload-advanced');
expect(fileuploadEl.children.length).toEqual(2);
expect(fileuploadEl.children.length).toEqual(3);
});

it('should change style, styleClass, chooseLabel, uploadLabel, cancelLabel, showUploadButton and showCancelButton (advanced)', () => {
Expand Down Expand Up @@ -98,7 +98,7 @@ describe('FileUpload', () => {
expect(fileNameEl).toBeTruthy();
expect(removeButtonEl).toBeTruthy();
expect(fileNameEl.nativeElement.textContent).toEqual('primeng.txt');
expect(fileSizeEl.nativeElement.textContent).toEqual('179 B');
expect(fileSizeEl.nativeElement.textContent).toEqual('179.000 B');
expect(fileupload.hasFiles()).toEqual(true);
expect(uploadButton.nativeElement.disabled).toEqual(false);
expect(cancelButton.nativeElement.disabled).toEqual(false);
Expand Down

0 comments on commit 8008a84

Please sign in to comment.