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

[ADF-3499] Make Card View Text Item reactive to user input #5953

Merged
merged 5 commits into from Sep 23, 2020

Conversation

davidcanonieto
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:

What is the current behaviour? (You can also link to an open issue here)
https://issues.alfresco.com/jira/browse/ACA-3499
The Card View Text Item input required to click outside to trigger the change event.

What is the new behaviour?
The Card View Text Item input now makes use of a much ore modern form control instead of the ngModel it was using. This allows it to fire in a control manner.

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:

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2020

Codecov Report

Merging #5953 into develop will decrease coverage by 1.11%.
The diff coverage is 83.33%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5953      +/-   ##
===========================================
- Coverage    77.77%   76.65%   -1.12%     
===========================================
  Files          143      841     +698     
  Lines         4005    18753   +14748     
  Branches       801     3698    +2897     
===========================================
+ Hits          3115    14376   +11261     
- Misses         632     3249    +2617     
- Partials       258     1128     +870     
Impacted Files Coverage Δ
lib/core/card-view/card-view.module.ts 100.00% <ø> (ø)
...card-view-textitem/card-view-textitem.component.ts 66.66% <83.33%> (ø)
.../core/card-view/models/card-view-boolitem.model.ts 100.00% <0.00%> (ø)
lib/core/models/bpm-user.model.ts 95.23% <0.00%> (ø)
lib/core/services/page-title.service.ts 100.00% <0.00%> (ø)
...atable/components/date-cell/date-cell.component.ts 90.00% <0.00%> (ø)
...ivities/diagram-alfresco-publish-task.component.ts 100.00% <0.00%> (ø)
...ess-services/src/lib/task-list/task-list.module.ts 100.00% <0.00%> (ø)
...rocess/components/start-process-cloud.component.ts 85.29% <0.00%> (ø)
lib/core/datatable/datatable.module.ts 100.00% <0.00%> (ø)
... and 690 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46ccda6...12aaa71. Read the comment docs.

Copy link
Contributor

@DenysVuika DenysVuika left a comment

Choose a reason for hiding this comment

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

some of the tests are going to be flaky, as you removed async but not calling done(). You can avoid done only if the func is wrapped with fakeAsync that some of the tests are missing.

fixture.detectChanges();
await fixture.whenStable();
fixture.whenStable().then(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

will be flaky. you need to call done() in case you are not using async test

fixture.whenStable().then(() => {

const value = getTextFieldValue(component.property.key);
expect(value).toBe('User Name');
Copy link
Contributor

Choose a reason for hiding this comment

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

needs done() call

@davidcanonieto davidcanonieto deleted the dev-dcano-ACA-3499 branch September 23, 2020 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants