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

Meta Tags #27

Closed
janschaefer opened this issue Sep 22, 2014 · 4 comments
Closed

Meta Tags #27

janschaefer opened this issue Sep 22, 2014 · 4 comments

Comments

@janschaefer
Copy link
Contributor

As a developer,
I want to be able to organize my tags hierarchically,
so that I get a better overview over my tags.

Idea:
Allow tags to be tagged by meta-tags. These meta-tags should also appear in the report and should allow for a hierarchical structuring of the tags in the report.

Example:
In order to hierarchically structure features under the meta-tag @Feature. We define an annotation @Feature:

@IsTag
@Retention( RetentionPolicy.RUNTIME )
public @interface Feature { }

Then we annotated feature tags with that tag:

@Feature 
@IsTag( type = "Feature", value = "Data Tables",
    description = "In order to get a better overview over the different cases of a scenario<br>"
            + "As a human,</br>"
            + "I want to have different cases represented as a data table" )
@Retention( RetentionPolicy.RUNTIME )
public @interface FeatureDataTables { }

The resulting report should then show something like this:

Feature
 - Data Tables
 - ...

It should also be collapsible

@janschaefer
Copy link
Contributor Author

In order to implement this, it might be that JGiven must generate a separate JSON file for all tags.

@nobeh
Copy link

nobeh commented Apr 13, 2015

While working on this enhancement, can the meta data be extended to also support customized CSS/HTML elements for the tags?

For example, we have added two tag definitions @Story and @Bug to annotated test scenarios. The tags are properly generated and we can navigate through them. However, it would be very nice to have a another annotation attribute to accept a custom CSS class for the tag that comes from custom.css. For example:

public @interface IsTag {
    String cssClassName() default ""; // Or the default can come from Foundation
}

@janschaefer
Copy link
Contributor Author

Great idea! I created a pull request to track that feature: #69

@janschaefer janschaefer modified the milestones: v0.7.1, v0.7.2 Apr 13, 2015
@janschaefer janschaefer modified the milestones: v0.7.3, v0.7.2 May 5, 2015
@janschaefer janschaefer modified the milestones: v0.8.0, v0.7.3 Jul 2, 2015
@janschaefer
Copy link
Contributor Author

I close this issue as a duplicate of #90

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

No branches or pull requests

2 participants