Protractor test navigation is broken since migration to angular 10

Hello, 

I currently use a Webstorm 2019.2, but i've tried it with lateste 2020 version, it's the same.

I cannot navigate to test file with I click on it, and there is no contextual menu:

 

Also minor problem execution time indicate more than 3years to run the test which is not true obviously :)

 

Here are some details

  • Angular 10 project
  • protractor version : 7.0.0
  • cucumber version : 6.0.5
  • node version : 12.7.0
  • typescript : 3.9.7
  • protractor-cucumber-framework: 6.2.1

 

As a side note, yes I am using a cucumber version, but cucumber execution fails with an error, but anyway I prefer protractor execution :)

 

Any help appreciated :)

 

 

 

6 comments
Comment actions Permalink

Works fine for me with Angular 10+protractor 7

Could you share a test project the issue can be repeated with?

0
Comment actions Permalink

Hello, I am sorry I can't share project test, because it's a bank project with legal clauses, I can't share :(

 

I am guessing it's a rare problem because I couldn' find similar issues anywhere.

 

Here's protractor.conf.js

 

// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

// IMPORTANT : for local E2E tests chromedriver version must be downloaded here : https://chromedriver.chromium.org/downloads
// Take the version corresponding to your chrome version and put the chromedriver.exe in node_modules/protractor/node_modules/webdriver-manager/selenium/
const driver = `../../node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver${
process.platform === 'win32' ? '.exe' : ''
}`;

// const { SpecReporter } = require('jasmine-spec-reporter');
const moment = require('moment');
const fs = require('fs');
const mkdirp = require('mkdirp');
const reporter = require('cucumber-html-reporter');

const reportPath = `e2e/report-e2e/${moment().unix()}`;

if (!fs.existsSync(`${reportPath}`)) {
mkdirp(`${reportPath}`);
}

const url = 'http://localhost:4200';

const runFromWebstorm = true;

exports.config = {
env: null,
baseUrl: url,

capabilities: {
generateReport: true,
takeScreenshots: true,
browserName: 'chrome',
chromeOptions: {
args: ['--headless', '--disable-gpu', '--no-sandbox']
}
},
directConnect: true,
chromeDriver: driver,
framework: 'custom', // custom pour utiliser cucumber
frameworkPath: require.resolve('protractor-cucumber-framework'),
specs: ['../features/**/*.feature'],
suites: {
// déclare des suites de feature que l'on pourra run indépendamment les unes des autres si besoin
homeFeature: '../../features/home/home.feature',
developerSearchFeature: '../features/developer/developer-search.feature',
developerDashboardFeature: '../features/developer/developer-dashboard.feature'
},
cucumberOpts: {
reportPath: reportPath,
'no-colors': true,
require: ['../support/*.ts', '../step-definitions/home/*.step.ts', '../step-definitions/developer/*.step.ts'],
tags: [], // <string[]> (expression) premet de déclarer des tags utilisables comme config pour l'execution des feautre
strict: true, // <boolean> fail si protractor détecte un step indéfini ou en attente
dryRun: false, // <boolean> invoke formatters without executing steps
compiler: 'ts:ts-node/register',
failFast: true,
format: `json:${reportPath}/cucumber_report.json`
},
onPrepare: function () {
browser.driver.manage().window().setSize(1920, 1080);
require('ts-node').register({
project: runFromWebstorm ? '../tsconfig.e2e.json' : 'e2e/tsconfig.e2e.json'
});
browser.waitForAngularEnabled(false);
browser.manage().window().maximize(); // affiche le navigateur en plein écran
},
onComplete: function () {
const options = {
theme: 'bootstrap',
jsonFile: `${reportPath}/cucumber_report.json`,
output: `${reportPath}/cucumber_report.html`,
reportSuiteAsScenarios: true,
scenarioTimestamp: true,
launchReport: true
};
reporter.generate(options);
},
getPageTimeout: 60000,
allScriptsTimeout: 60000,
plugins: [],

// Since we want to use async/await we don't want to mix up with selenium's promise
// manager. In order to enforce this, we disable the promise manager.
SELENIUM_PROMISE_MANAGER: false
};

 

ANd a screenshot protractor conf : 

0
Comment actions Permalink

please try composing a sample project with similar setup the issue can be repeated with

0
Comment actions Permalink

Hello I tried, the project.zip is 28Mo large (of course without nod_modules, so I cannot post it :(

 

I hope I can upload it here, Also I've cut a lot of shit out related to security and intern URL of my organization.

 

I tried run tests and it's same story 

 

 

0
Comment actions Permalink

Please use one of the following for uploading:

0
Comment actions Permalink

None of these file sharing service are available in my company ... I'll just drop it, sorry for inconvenience.

0

Please sign in to leave a comment.