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

Support multiple tags #78

Closed
JonathanDagan opened this issue Jun 15, 2021 · 6 comments
Closed

Support multiple tags #78

JonathanDagan opened this issue Jun 15, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@JonathanDagan
Copy link

Is your feature request related to a problem? Please describe.
Currently when using the .tag() function the test can only posses one tag. I would like the plugin to have the option to tag the test with multiple tags so when running the tests by their tag I could run the same test under two different tags.

Describe the solution you'd like
I see two different ways to approach this issue. I would like to implement one of two options:

  1. Add a .tags() function that receives a list of arguments -> .tags(['TAG1', 'TAG2'])
  2. Chain the .tag() function multiple times -> .tag('TAG1').tag('TAG2')

The implementation needs to support typescript

Additional context
I would probably go for implementing the second option

@JonathanDagan JonathanDagan added the enhancement New feature or request label Jun 15, 2021
@JonathanDagan
Copy link
Author

Im currently working on trying to implement this

@Shelex
Copy link
Owner

Shelex commented Jun 15, 2021

Hi @JonathanDagan .
Thank you for opening a feature request.

Actually I would go with extending signature for .tag() to be a variadic function, rather than providing new command, as it makes a precedent to implement additional commands for other entities.

@Shelex
Copy link
Owner

Shelex commented Jun 30, 2021

@JonathanDagan Hi. Do you need any help with the issue?
You can contact me by e-mail mentioned in my profile. In case you are not going to implement it - let me know anyway.

@JonathanDagan
Copy link
Author

I will... Just was busy recently and will get to it asap 😄

@Shelex
Copy link
Owner

Shelex commented Sep 6, 2021

Hi @JonathanDagan .
Is there any progress on this feature?
Should I just implement it?)

@Shelex
Copy link
Owner

Shelex commented Sep 20, 2021

published 2.14.0, now tag function is variadic, so it can have multiple tags in same command with complete backward compatibility:

cy.allure().tag('one')
cy.allure().tag('two', 'three', 'four')

@Shelex Shelex closed this as completed Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants