Cognizant-CDE-Australia / generator-confit

Build-tool generator for current and future web.
https://odecee.github.io/generator-confit
Other
29 stars 3 forks source link

Enable browser synchronisation in protractor for angular app #61

Closed Nighthawk14 closed 8 years ago

Nighthawk14 commented 8 years ago

When creating an angular app with confit the protractor configuration is set up like that:

onPrepare: function() {
    // Turn off the angular-sync part-of-Protractor, as we are using Protractor in a generic way
    browser.ignoreSynchronization = true;

    return browser.getProcessedConfig().then(function(config) {
      // Attach the reporters
      config.reportWriters.forEach(function(fn) {
        fn();
      });
    });
  },

Protractor should probably not ignoreSynchronization by default for an angular app.

uglow commented 8 years ago

This configuration is currently used for both Angular & non-Angular browser projects. The solution will be to wrap this line in an EJS template that conditionally renders the line if the framework is 'Angular 1.x'