I had Angular already on my system and had briefly worked with it around 7-8 months ago.
A short while ago, I created a new Angular project
ng new testproject
The strange part is that the e2e folder was not created!
I tried uninstalling the CLI, clearing the cache and reinstalling Angular.
npm uninstall -g angular-cli @angular/cli
npm cache clean --force
npm install -g @angular/cli@latest
But this has not worked.
This is the output of ng --version
:
This is what the folder looks like:
e2e folder contains This is the default configuration for the e2e folder created by the Angular CLI. e2e stands for end-to-end and it refers to e2e tests of the website. It is used to track user behavior on the website while testing.
For running Nightwatch, you need a local standalone Selenium server, as well as WebDriver, to use Chrome/Firefox for end to end testing Angular applications locally. This command places the Nightwatch executable in the ./node_modules/. bin folder so that there is no need to install it globally.
ng e2elink Builds and serves an Angular application, then runs end-to-end tests.
Application project fileslink. By default, the CLI command ng new my-app creates a workspace folder named "my-app" and generates a new application skeleton in a src/ folder at the top level of the workspace. A newly generated application contains source files for a root module, with a root component and template.
The syntax for ng e2e command is as follows − ng e2e <project> [options] ng e <project> [options] ng e2e builds, serves an application and then runs the end to end test cases using protractor. Options are optional parameters.
The command takes an optional project name, as specified in the projects section of the angular.json workspace configuration file. When a project name is not supplied, executes the e2e builder for the default project.
Builds and serves an Angular app, then runs end-to-end tests. The command takes an optional project name, as specified in the projects section of the angular.json workspace configuration file. When a project name is not supplied, executes the e2e builder for the default project.
Get Data from a Server Builds and serves an Angular app, then runs end-to-end tests. The command takes an optional project name, as specified in the projects section of the angular.json workspace configuration file. When a project name is not supplied, executes the e2e builder for the default project.
The Future of Protractor
The Angular team has been working with the community to determine the future of Protractor. We’re currently reviewing the feedback shared in the RFC. We’re still figuring out the best future for Protractor. We’ve opted to not include it in new projects and, instead, provide options with popular 3rd party solutions in the Angular CLI. We are currently working with Cypress, WebdriverIO, and TestCafe to help users adopt the alternative solutions. More information to come as this develops.
blog.angular.io/angular-v12-is-now-available-32ed51fbfd49
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With