-
Notifications
You must be signed in to change notification settings - Fork 2k
E2E tests not executing #929
Comments
@jloveland we should probably have an ng-app on either the HTML or body, though I usually prefer HTML. https://github.com/meanjs/mean/blob/master/modules/core/server/views/layout.server.view.html |
That didn't work. Need someone to take a stab at this who has more Angular experience. When was the last time someone tries running e2e tests with gulp protractor? |
@jloveland have you tried running protractor through Grunt? |
@ilanbiala I found that when running
I will fix this when I add e2e tests to #910 |
@jloveland is there any way to start the server before we start Karma? I thought there was. |
I guess the grunt configuration is missing the protractor task... we can add it with this...
If this is added to the grunt file the tests should run... Although the User e2e is incorrect, due to the how we're handling client validation with ng-messages. The only additional steps for a developer using the e2e tests is to make sure selenium web driver is installed; I also installed protractor globally (not sure if it's needed though) One thing I noticed is that the protractor tests are pointing to port |
@jloveland Are you adding a grunt task as well? |
yes, I am adding both grunt and gulp |
@jloveland I'm wondering if the intention of the e2e tests is for them to be ran against a production/staging database (environment). Looking at the articles e2e test, it looks like it is expecting the count of articles to be zero because when this test was written, we didn't allow non authenticated users to view the articles list. I think the e2e may need/expect actual data. It's a little confusing because the test is also expecting "Missing Credentials". WDYT? @lirantal @ilanbiala @codydaig Should the e2e tests be running against an empty test database, or a production/staging database that has actual data? I'm thinking the latter. |
This is a pretty good article that covers this subject... What I gather from this article, is that we should be running it against our test environment, and writing our e2e tests with data population; just like we're doing in the server tests. |
Yup, I am writing tests that use the test database. I have a function that will drop the test database and then my sign up tests create a user by filling out the sign up form. Then I can test sign in, etc. |
@mleanos always test from scratch to avoid false logic in the code. |
@ilanbiala Thank you. That sounds about right to me. I just got thrown off because the articles e2e test is a bit confusing. |
after running
gulp protractor
from the angular docs:
It looks like we manually bootstrap here
Do we need to add
np-app
somewhere?The text was updated successfully, but these errors were encountered: