Giter Club home page Giter Club logo

dpunkt-buch-beispiele's People

Contributors

justphil avatar robinboehm avatar stefanlange avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dpunkt-buch-beispiele's Issues

Unit Test in Chapter 04_01

Hey Guys,

I found a little bug concerning the unit test in the Admin-Chapter.
storeBook() in the book_data-Service also needs to store a deep copy of the book-object.

Otherwise the should properly update the book object-scenario will pass, even if the API returns an empty updateBook-function.

In the current state the line book.abstract = 'TEST'; in the unit test references the object in srv._books.

This might be a little confusing.

Thanks for your help.

All the best
Schwaddi

Running E2E Test produces "Selector .bm-book-title did not match any elements"

I have a problem running the E2E test in chapter 3.4.7 of your book on my Mac.
I downloaded the ch03_02_details_view folder so that I am sure I did not have any typos.

I start the http-server in the app directory:

tis-mbp:.ssh ti$ cd /Users/ti/Downloads/dpunkt-buch-beispiele-master/ch03_02_details_view/app/
tis-mbp:app ti$ http-server
Starting up http-server, serving ./ on port: 8080
Hit CTRL-C to stop the server

And then I access the DetailsView which is displayed correctly in the web browser. I also see the logs of the http-server:

[Sun, 03 Aug 2014 15:03:01 GMT] "GET /" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36"
[Sun, 03 Aug 2014 15:03:01 GMT] "GET /lib/angular/angular.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36"
[Sun, 03 Aug 2014 15:03:01 GMT] "GET /lib/angular-route/angular-route.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36"
[Sun, 03 Aug 2014 15:03:01 GMT] "GET /scripts/app.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36"
[Sun, 03 Aug 2014 15:03:01 GMT] "GET /scripts/controllers/book_details.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36"
[Sun, 03 Aug 2014 15:03:01 GMT] "GET /favicon.ico" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36"
[Sun, 03 Aug 2014 15:03:13 GMT] "GET /templates/book_details.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36"

The http-server is running and I do this through command line:

tis-mbp:ch03_02_details_view ti$ pwd
/Users/ti/Downloads/dpunkt-buch-beispiele-master/ch03_02_details_view
tis-mbp:ch03_02_details_view ti$ /usr/local/lib/node_modules/karma/bin/karma start karma-e2e.conf.js 
DEBUG [plugin]: Loading karma-* from /usr/local/lib/node_modules
DEBUG [plugin]: Loading plugin /usr/local/lib/node_modules/karma-ng-scenario.
INFO [karma]: Karma v0.12.19 server started at http://localhost:9876/_karma_/
WARN [launcher]: Can not load "Chrome", it is not registered!
  Perhaps you are missing some plugin?
DEBUG [watcher]: Resolved files:
    /usr/local/lib/node_modules/karma-ng-scenario/lib/angular-scenario.js
    /usr/local/lib/node_modules/karma-ng-scenario/lib/adapter.js
    /Users/ti/Downloads/dpunkt-buch-beispiele-master/ch03_02_details_view/test/e2e/templates/book_details.spec.js

After that I go to my web browser and call the URL http://localhost:9876/_karma_/ and I see Karma starting, for a millisecond flashing some output and then finally only Karma v0.12.19 - disconnected.

The log of the http-server does not print any new lines when calling karma start karma-e2e.conf.js. The log of karma show me this:

DEBUG [web-server]: serving: /usr/local/lib/node_modules/karma/static/client.html
DEBUG [web-server]: serving: /usr/local/lib/node_modules/karma/static/karma.js
DEBUG [web-server]: upgrade /_karma_/socket.io/1/websocket/vTdETH-V5Fvz_rsWbTIR
DEBUG [proxy]: NOT upgrading proxyWebSocketRequest /_karma_/socket.io/1/websocket/vTdETH-V5Fvz_rsWbTIR
DEBUG [karma]: A browser has connected on socket vTdETH-V5Fvz_rsWbTIR
INFO [Chrome 36.0.1985 (Mac OS X 10.9.4)]: Connected on socket vTdETH-V5Fvz_rsWbTIR with id manual-1422
DEBUG [web-server]: serving: /usr/local/lib/node_modules/karma/static/context.html
Chrome 36.0.1985 (Mac OS X 10.9.4) E2E: book details view should show the correct book details FAILED
    element '.bm-book-title' html
    /Users/ti/Downloads/dpunkt-buch-beispiele-master/ch03_02_details_view/test/e2e/templates/book_details.spec.js:10:16: Selector .bm-book-title did not match any elements.
Chrome 36.0.1985 (Mac OS X 10.9.4): Executed 1 of 1 (1 FAILED) ERROR (0.163 secs / 0.128 secs)
DEBUG [karma]: Run complete, exitting.
DEBUG [launcher]: Disconnecting all browsers

So something went wrong, but I do not know what exactly and how to fix it. Do you have an idea?

E2E tests fail in chapter 3.5 list view

I followed the instructions in the book to chapter 3.5 Everything was OK until now.

All tests with following expression fail:

...expect(repeater(selector).column('book.title'))...

It seems like the result array is empty

Chrome 41.0.2272 (Mac OS X 10.9.5) E2E: book list view should show the books in the proper order FAILED
    expect repeater 'table.bm-book-list tr' column 'book.title' toEqual ["CoffeeScript","JavaScript für Enterprise-Entwickler","Node.js & Co."]
    /Users/waldo/Documents/_Personal/bookmoney/test/e2e/templates/book_list.spec.js:44:35: expected ["CoffeeScript","JavaScript für Enterprise-Entwickler","Node.js & Co."] but was []

Any ideas? Thank you.

Question about services with REST

Hi, I am currently at chapter 4.3 where you have to refactor the BookDataService in order to communicate with a REST backend. I have a question regarding the architecture: You refactored the service in a way so that you had to refactor all components which use this service in order to function properly. Also all components using the service have to "know" about the inner implementation of the service (which is REST) because they have to switch to promises.
In the beginning of your book you talked about the advantage that you can easily change services and their implementation without refactoring calling components. So my question is: Why didn't you implement the promise inside the BookDataService just returning the book object?

Thanks a lot, the book rocks 👍

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.