Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNT-24575] Added APIS and models folder information dialog #10460

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

swapnil-verma-gl
Copy link
Contributor

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation
  • Other... Please describe:
    Added APIs and models for folder information

What is the current behaviour? (You can also link to an open issue here)
No APIs for folder information exist

What is the new behaviour?
Added APIs to new backend endpoints

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:
https://hyland.atlassian.net/browse/MNT-24575

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing unit tests for this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no unit tests for this entire file. Should I create one, and add the unit tests for only the new code?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swapnil-verma-gl the same like above - it will be enough if you add unit tests only for your code which you added/changed. For old code we can write unit tests later

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added unit tests

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swapnil-verma-gl I can't see tests for this file. Maybe you forgot to push that file. There should be file for tests for nodes.api.ts. See example for tags.api.ts where we have tests in file called tagApi.spec.ts

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is still not addressed


import { TestBed } from '@angular/core/testing';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { AlfrescoApiService, AlfrescoApiServiceMock, NodesApiService } from '@alfresco/adf-content-services';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're in content-services library so importing parts of it from @alfresco/adf-content-services is not correct

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is still not addressed

/**
* Initiate a new request to calculate folder size.
*
* **Note:** this endpoint is available in Alfresco 7.1 and newer versions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't it added in latest version? Does it also have backwards compatibility until 7.1?

/**
* Gets the size of a folder.
*
* **Note:** this endpoint is available in Alfresco 7.1 and newer versions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question here

* @returns Folder details
*/
getFolderSizeInfo(nodeId: string, jobId: string): Observable<SizeDetailsEntry> {
return from(this.nodesApi.getFolderSizeInfo(nodeId, jobId));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about handling some cases when the job is not done yet and user is trying to get the response? Are you planning to handle it here or rather in ACA when this will be called?


Initiate a new request to calculate folder size.

> this endpoint is available in **Alfresco 7.1** and newer versions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question about compatibility here


Gets the size details of a folder

> this endpoint is available in **Alfresco 7.1** and newer versions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here

@@ -1196,6 +1198,67 @@ nodesApi.updateNodeContent(`<nodeId>`, contentBodyUpdate, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
```
## initiateFolderSizeCalculation

Initiate a new request to calculate folder size.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Initiate a new request to calculate folder size.
Initiates a new request to calculate folder size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants