Skip to content

Commit

Permalink
fixed ptor
Browse files Browse the repository at this point in the history
  • Loading branch information
jonniespratley committed Dec 7, 2014
1 parent 4796fee commit 6eaf43b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ module.exports = function (grunt) {
}
});


grunt.registerTask('ptor', ['coffee:test', 'protractor_webdriver', 'protractor']);
grunt.registerTask('build-docs', [ 'useminPrepare', 'autoprefixer', 'concat', 'ngmin']);
grunt.registerTask('build', ['clean:dist', 'useminPrepare', 'concurrent:dist', 'autoprefixer', 'concat', 'ngmin', 'copy:dist', /*'cdnify',*/ 'cssmin', 'uglify', 'rev', 'usemin']);

Expand Down
21 changes: 11 additions & 10 deletions protractor.conf.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@

// An example configuration file.
exports.config = {
baseUrl: 'http://localhost:9000',
// The address of a running selenium server.
//seleniumAddress: 'http://localhost:4444/wd/hub',
seleniumAddress: 'http://localhost:4444/wd/hub',
// ---- 3. To use remote browsers via Sauce Labs -----------------------------
// If sauceUser and sauceKey are specified, seleniumServerJar will be ignored.
// The tests will be run remotely using Sauce Labs.
sauceUser: process.env.SAUCE_USERNAME,
sauceKey: process.env.SAUCE_ACCESS_KEY,
//sauceUser: SAUCE_USERNAME,
//sauceKey: SAUCE_ACCESS_KEY,
// Use sauceSeleniumAddress if you need to customize the URL Protractor
// uses to connect to sauce labs (for example, if you are tunneling selenium
// traffic through a sauce connect tunnel). Default is
sauceSeleniumAddress: 'ondemand.saucelabs.com:80/wd/hub',
//sauceSeleniumAddress: 'http://localhost:4445/wd/hub',

// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'
'name': 'AngularCMS',
'browserName': 'chrome',
'chromeOptions': {
'args': ['show-fps-counter=true']
}
},

params: {
Expand All @@ -35,12 +40,8 @@ exports.config = {
defaultTimeoutInterval: 30000
},
onPrepare: function(){
browser.driver.get(browser.params.baseUrl);

//browser.driver.get(browser.params.baseUrl);
var SpecReporter = require('jasmine-spec-reporter');
jasmine.getEnv().addReporter(new SpecReporter({displayStacktrace: true}));
},
onComplete: function () {
browser.driver.close();
}
};
8 changes: 4 additions & 4 deletions test/protractor/app-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,8 @@ loginPage = null
Protractor e2e Tests
###
describe "Angular-CMS App", ->
App = new AppPage()
registerPage = new RegisterPage()
loginPage = new LoginPage()

beforeEach ->
App = new AppPage()
App.get()

#Welome Story: the initial page
Expand Down Expand Up @@ -112,6 +109,7 @@ describe "Angular-CMS App", ->
###
describe 'Register: ', ->
it 'should have email and password inputs with a button to submit the form', ->
registerPage = new RegisterPage()
registerPage.get()
expect(driver.getCurrentUrl()).toContain 'register'
expect(j$.element('form', 'Login form').count()).toEqual 1
Expand All @@ -127,6 +125,7 @@ describe "Angular-CMS App", ->

#Click the login button each time
beforeEach ->
loginPage = new LoginPage()
element('a[href="#/login"]', 'Login button').click()

#Make sure we end up at the login page to enter our credentials
Expand All @@ -149,6 +148,7 @@ describe "Angular-CMS App", ->
#The dashboard implementation
describe 'Dashboard: viewing the dashboard...', ->
beforeEach ->
loginPage = new LoginPage()
loginPage.login('[email protected]', 'test')
browser.sleep 1
it 'should have a link to the profile page', ->
Expand Down

0 comments on commit 6eaf43b

Please sign in to comment.