Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Integration testing #82

Merged
merged 6 commits into from
Sep 11, 2015
Merged

Integration testing #82

merged 6 commits into from
Sep 11, 2015

Conversation

jwasilgeo
Copy link
Contributor

@tomwayson please review

  • adds protractor integration testing
  • adds the ability to do a new gulp test
  • attempts to establish a pattern for:
    • waiting on async JSAPI map properties in the DOM
    • placing some reusable utility functions among specs in the protractor conf.js (debatable)
  • so far, includes specs for set-basemap, simple-map, and web-map

resolves #79

Jacob Wasilkowski added 4 commits September 6, 2015 16:28
…cs to be global within protractor; moved spec files to sub-directory
comments typo fix
@tomwayson tomwayson self-assigned this Sep 10, 2015
avoids re-loading the page to run subsequent tests
also moved jshint globals out of comments into .jshintrc
@tomwayson
Copy link
Member

Nice work @jwasil, this is so 💰!

I've reviewed your comments about waiting for async JSAPI map properties and putting the reusable utility functions in the global.

First, I've replaced the global helper functions w/ a helper module that is loaded by the specs. I'm just not familiar enough w/ protractor to know if there is a better way to wait for async elements to be loaded on the page than the way you are doing it. It appears to be working consistently for me, so unless you are seeing the tests fail simply due to race conditions, I'd say let's go ahead and merge this. We can always refine the way those helper methods later if needed.

Also, I configured protractor to use Jasmine 2 so we could use beforeAll() to load each page only one time per spec. I like my integration specs to run as many tests as possible before having to reload the page (if at all).

Once merged into master I'll open up individual issues for each of the remaining specs as well as one for integrating the tests into the new release process.

I'm so fired up about getting these tests into master! I think it's really going to give us confidence when merging some of those long overdue PRs.

@tomwayson tomwayson assigned jwasilgeo and unassigned tomwayson Sep 11, 2015
@jwasilgeo
Copy link
Contributor Author

@tomwayson thank you for the thorough review and for making some solid enhancements!

I really like the new helper.js for the shared spec functions, rather than hitching on to Protractor's global.

And Jasmine 2's beforeAll() is ideal; the original beforeEach() page load was getting to be unnecessary and making me feel a tiny, underlying current of :rage1:. This could also open up the doors for other kinds of matchers we could use (if need be).

If we want to revisit the helper functions in the future, maybe we could use Jasmine 2's done() to help us out (which I recall you pointed out to me in a separate convo). That's assuming there is a way to make it work for us when dealing with individual async element locators, rather than whole assertions. Just a thought for later on.

jwasilgeo pushed a commit that referenced this pull request Sep 11, 2015
@jwasilgeo jwasilgeo merged commit 102f838 into master Sep 11, 2015
@jwasilgeo jwasilgeo deleted the integration-testing branch September 11, 2015 12:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add integration tests
2 participants