-
Notifications
You must be signed in to change notification settings - Fork 724
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
[RFR] Use fakerest and webpack-dev-server instead of json-server and grunt-connect #625
Conversation
@@ -5,7 +5,7 @@ install: | |||
./node_modules/protractor/bin/webdriver-manager update | |||
|
|||
run: | |||
@grunt | |||
@./node_modules/webpack-dev-server/bin/webpack-dev-server.js --colors --devtool cheap-module-inline-source-map --content-base examples/blog --port 8000 |
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.
don't forget to remove the related conf in Gruntfile
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.
Done
Awesome! |
@@ -0,0 +1 @@ | |||
../../../node_modules/fakerest/dist/FakeRest.min.js |
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.
I don't understand what that file does?
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.
It's just a symlink to the fakerest node module, to be able to import it in the <script>
of the demo index.
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.
Ah OK, that's how GitHub show symlinks, I didn't know
Let me add another item: -[ ] Add a task to compile and save the JS so that the entire demo can be run from a static server (think gh-pages) |
} | ||
} | ||
}, | ||
test_fakerest: { | ||
src: 'node_modules/fakerest/dist/FakeRest.min.js', |
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 do you need to copy if there is a symlink?
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.
Because copy from example build directory to test build directory does not copy symlinks (which would be broken anyway).
Closes #320 |
Could you rebase? No need for the additional task I mentioned, we'll use something else for the demo. |
5d36bf5
to
901546a
Compare
Rebased |
@@ -165,7 +165,7 @@ describe('List filter', function () { | |||
$$('.filters .filter:nth-child(1) input').sendKeys('be'); | |||
browser.driver.sleep(600); // debounce delay | |||
$$('ma-datagrid-pagination .total').then(function (totalElements) { | |||
expect(totalElements[0].getText()).toBe('1 - 5 on 5'); | |||
expect(totalElements[0].getText()).toBe('1 - 4 on 4'); |
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 does it change if the dataset is the same? Something's wrong.
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.
I don't know how it's possible to find 5 records, see http://ng-admin.marmelab.com/#/comments/list?search={%22q%22:%22be%22}&page=1
But if I search for b
instead of be
, 5 records are found, maybe a coincidence, but this is the only explaination I see, protractor wasn't wait for the e
with the old basecode.
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.
OK, FakeRest doesn't handle the q search inside composite fields (the 5th comment has an author.name containing 'be'.
901546a
to
d437e9f
Compare
[RFR] Use fakerest and webpack-dev-server instead of json-server and grunt-connect
fakerest
Gruntfile.js