Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a DSL around test titles or options #1318

Closed
brian-mann opened this issue Feb 15, 2018 · 1 comment
Closed

Create a DSL around test titles or options #1318

brian-mann opened this issue Feb 15, 2018 · 1 comment
Assignees

Comments

@brian-mann
Copy link
Member

Full proposal is needed but here is some WIP code that we've internally discussed...

The idea here is that we'll extend mocha and automatically do special things based on either the test title or options.

# if Cypress.isBrowser("chrome")
# describe "BROWSER=chrome chrome edge cases", ->
#   it "a", ->
#   it "b", ->
#   it "c", ->

# Cypress._.times 100, (i) ->
#   it "#{i+1} is a flaky test", ->
#
#   it "DUPLICATE=100 is a flaky test"
#

minimist(test.title)

# describe "a parent", { browser: 'safari' }, ->
describe "BROWSER=safari a parent", ->

  it "is a flaky test", { browser: ['chrome', '!edge'] }, ->

  it "is a flaky test", { retryUntilFailure: true }, ->

  it "is a flaky test", { repeat: 100 }, ->

  it "BROWSER=!edge,chrome,firefox", ->

  it "RETRY_UNTIL_FAILURE is a flaky test", ->
    it.only("aljskfej", ->)

    it.retryUntilFailure(1).isBrowser("chrome", "is a flaky test", ->

    it.retryUntilFailure(1).isBrowser("chrome")("is a flaky test", ->
@brian-mann brian-mann added the stage: proposal 💡 No work has been done of this issue label Feb 15, 2018
@jennifer-shehane
Copy link
Member

Closing due to inactivity / lack of support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants