-
Notifications
You must be signed in to change notification settings - Fork 16
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
CPS-356: Fix issue with End/Start date not updating on Peoples tab #714
Conversation
e5562c8
to
caa75de
Compare
b91fd3c
to
02d6910
Compare
02d6910
to
62e674e
Compare
@@ -22,7 +22,7 @@ | |||
"--no-sandbox" | |||
] | |||
}, | |||
"asyncCaptureLimit": 3, | |||
"asyncCaptureLimit": 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this reduced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using more than 1 thread creates lot of false negatives. But with 1, its much more reliable.
@@ -2,7 +2,7 @@ | |||
|
|||
const Utility = require('./utility.js'); | |||
|
|||
module.exports = async (page, scenario, viewport) => { | |||
module.exports = async (page, scenario, viewport, dontWait) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many parameters. Let's use options if possible. And instead of don't wait why not a { wait: 0 }
with the default being 1000
?
} | ||
|
||
await mouseEventsHelper(page, scenario); | ||
await mouseEventsHelper(page, scenario, null, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null
, and true
are not very clear. This is the problem of sending a lot of parameters, specially boolean parameters.
// remove drupal/civicrm error logging, which creates difference | ||
await this.removeElements('#console'); | ||
|
||
await this.closeSystemErrorNotification(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not remove the notifications instead of closing them and waiting for them to close?
f260db3
to
1f434ec
Compare
Overview
In the peoples tab of Case Details, after updating the Start/End date from the inline datepicker, the dates got reverted when going to another tab, and then coming back to Peoples tab. This PR fixes this bug.
Before
After
Technical Details
Every time we go to Peoples tab, it fetches the Roles from
$scope.item
. But once we update a relationship, if we don't callrefresh
function, the$scope.item
wont be changed. So again it will revert back to previous values, when going back to the tab.But calling
$scope.refresh
updates the$scope.item
object, which trickles down to individual tabs like People Tab.For all other fields of the people tab,
$scope.refresh
was called, but it was not for while updating the dates, hence the bug happened.To fix this,
ang/civicase-base/directives/send-to-api-on-change.directive.js
has been removed as its not used anymore.Also replaced
data-api-data="roleDatesUpdater.getApiCallsForStartDate(role, item.id)"
withng-change="refresh(roleDatesUpdater.getApiCallsForStartDate(role, item.id))"
.Backstop JS
Similar to compucorp/backstopjs-config#45, the ability to run backstop on customisable branches has been added. The following inputs are taken from the user to run the tests
Also all the backstop scenarios has been fixed, and in my last few testing, there was 0 false positives.
Also removed loading state scenarios as they were not working 90% of the time.