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

Test case change for updateOnly property #276

Merged
merged 2 commits into from
Aug 22, 2017
Merged

Conversation

rashmihunt
Copy link
Contributor

@rashmihunt rashmihunt commented Aug 12, 2017

@bajtos PTAL This test case change is due to addition of updateProperty through PR loopbackio/loopback-datasource-juggler#1453 - fixes the CI for this juggler PR.

@@ -1102,7 +1102,7 @@ define(['angular', 'given', 'util'], function(angular, given, util) {
// Type "number" was normalized to "Number"
price: { type: 'Number' },
// auto-injected id property
id: { id: 1, generated: true, type: 'Number' },
id: { id: 1, generated: true, type: 'Number', updateOnly: true },
Copy link
Member

Choose a reason for hiding this comment

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

I have mixed feelings about this change. Sure, it will fix the problem once all packages affected by updateOnly are published to npmjs, but until that happens, people may start seeing build failures.

I am proposing to rework this test and make it more resilient against possible changes in model definitions. I am thinking about a small change - replace eql operator with something like .contains or .have.properties (I never remember what is the right chai method to use). With this change in place, the test should be passing against both the currently-release loopback/juggler version and the upcoming one.

Thoughts?

Copy link
Contributor Author

@rashmihunt rashmihunt Aug 14, 2017

Choose a reason for hiding this comment

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

@bajtos yes.. I agree.

@rashmihunt
Copy link
Contributor Author

@bajtos PTAL

  • addressed code review comments

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

Successfully merging this pull request may close these issues.

2 participants