Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab
GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 23,618
    • Issues 23,618
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 834
    • Merge Requests 834
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Packages
    • Packages
    • Container Registry
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #29080

Closed
Open
Opened May 30, 2019 by Mark Lapierre@mlapierre0 of 1 task completed0/1 task
  • Report abuse
  • New issue
Report abuse New issue

[QA] Discuss reducing duplication vs. reducing readability in E2E doc

The following discussion from gitlab-ce!28716 should be addressed:

  • @mlapierre started a discussion: (+2 comments)

    I think the doc should discuss the trade-off between reducing duplication and reducing readability. This might be a good place for that.

    By using the @labels variable instead of the label string values, we can't as easily read the examples. Even though it's a short, simple example I still have to put in some effort to mentally substitute the variables for the values when reading the tests.

    I think this is why thoughtbot avoids using let: https://github.com/thoughtbot/guides/blob/master/style/testing/avoid_let_spec.rb (and we refer to their styleguide in ours)

The examples have been updated, but it would still be useful to give a counterexample of code that reduces duplication but also reduces readability as a consequence (and how to avoid that).

Related issues

  • Discussion
  • Designs
Assignee
Assign to
Backlog
Milestone
Backlog
Assign milestone
Time tracking
None
Due date
None
9
Labels
Quality docs-update documentation missed:12.0 missed:12.1 missed:12.1 missed:12.2 missed:12.3 missed:12.4
Assign labels
  • View project labels
Reference: gitlab-org/gitlab#29080