Skip to content

Show setup options during ng new #22978

Open

Description

@mgechev

🚀 Feature request

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Description

It's not obvious to people that we provide integrations with testing and linting solutions even though they exist. Folks have to run ng e2e to see the supported testing frameworks and after that run ng add [solution]. Alternatively, for linting they have to run ng lint to get ESLint installed, but none of the tools comes by default.

Describe the solution you'd like

To better inform developers about the integrations we provide, we can update our setup experience. When folks create a new project we can show two prompts:

- Which end-to-end testing framework you want to use:
  - Cypress
  - Nightwatch
  - WebDriver
  - None
- Do you want ESLint? (Y/n)

If folks select None and n they should still be able to add e2e/linting to their projects with ng add [schematics]. If people select an integration we can automatically run ng add [...] at setup time for them.

Activity

  1. krzyhan commented on Apr 12, 2022

    @krzyhan

    And how about unit test framework? Imho it would be nice to allow user to choose Karma/Jest and so on as well.
    What do you think?

  2. mgechev commented on Apr 12, 2022

    @mgechev
    MemberAuthor

    Let's keep the unit testing framework outside this conversation. I'll follow up separately on the topic.

  3. murindwaz commented on Apr 12, 2022

    @murindwaz

    This is well overdue feature @mgechev — what would be the criteria to add(or remove) more choice (options) in the list of available e2e test frameworks? What would be the criteria to make it to that default suggestions list?

  4. mgechev commented on Apr 12, 2022

    @mgechev
    MemberAuthor

    We already have a list of established choices. This feature only proposes to add them as part of the ng new experience. Let's focus on discussing if we want to do this in the current issue.

  5. added this to the needsTriage milestone on Apr 13, 2022
  6. alan-agius4 commented on Apr 13, 2022

    @alan-agius4
    Collaborator

    In version 14, we added similar prompt to ng deploy & ng e2e when the target is not configured.

    ng e2e
    Cannot find "e2e" target for the specified project.
    You can add a package that implements these capabilities.
    
    For example:
      Cypress: ng add @cypress/schematic
      Nightwatch: ng add @nightwatch/schematics
      WebdriverIO: ng add @wdio/schematics
    
    Would you like to add a package with "e2e" capabilities now? (Use arrow keys)
    ❯ No
      Cypress
      Nightwatch
      WebdriverIO
    
  7. d-koppenhagen commented on May 4, 2022

    @d-koppenhagen

    What about Playwright for e2e?

  8. d-koppenhagen commented on May 30, 2022

    @d-koppenhagen

    checking out this Playwright issue, it seems there is already a communication about adding playwright or at least they will soon release a schematic: microsoft/playwright#11258

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions