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

Add cssClass to @IsTag to customize tags in HTML reports #69

Merged
merged 4 commits into from
Apr 14, 2015

Conversation

janschaefer
Copy link
Contributor

Add a new attribute cssClass to the @IsTag annotation.

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

@nobeh
Copy link

nobeh commented Apr 13, 2015

Thanks for picking this up so quickly! 👍

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 88.17% when pulling 3af798b on istag_cssclass into e45d95f on master.

Jan Schäfer added 2 commits April 14, 2015 18:20
- also copy the custom CSS file to the target folder (fixes #70)
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 88.18% when pulling cba2787 on istag_cssclass into e45d95f on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 88.18% when pulling cba2787 on istag_cssclass into e45d95f on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 88.18% when pulling cba2787 on istag_cssclass into e45d95f on master.

janschaefer added a commit that referenced this pull request Apr 14, 2015
Add cssClass and color to @istag to customize tags in HTML reports
@janschaefer janschaefer merged commit f86e89e into master Apr 14, 2015
@janschaefer janschaefer deleted the istag_cssclass branch April 14, 2015 17:28
@janschaefer
Copy link
Contributor Author

@nobeh if you want to try out the new feature you can do so by using the snapshot repository https://oss.sonatype.org/content/repositories/snapshots/ with JGiven version 0.7.2-SNAPSHOT

@nobeh
Copy link

nobeh commented Apr 15, 2015

I'm having this tag:

@IsTag(value = "Story", description = "Ticket is a tag to label test scenarios.",
    descriptionGenerator = TicketDescriptionGenerator.class, 
    prependType = false, type = "Story", color = "blue")
@Retention(RetentionPolicy.RUNTIME)
public @interface Story {

  /**
   * @return
   */
  String value();

}

and the tag is used like @Story("CSP-3031") which is similar to JGiven's ticket URL generator.

then using html report, gives me snippets like:

<div class="tag-line">
   <div class="tag tag-Story">
      <a href="Story-CSP-3031.html">CSP-3031</a>
   </div>
</div>

and using html5 report, gives me snippets like:

<span ng-repeat="tag in scenario.tags" class="tag ng-scope">
   <a href="#tag/Story%2FCSP-3031">
      <span class="radius label ng-binding">CSP-3031</span>
   </a>
</span>

What am I missing?

@janschaefer
Copy link
Contributor Author

Are you sure that updated the version to 0.7.2-SNAPSHOT?

@nobeh
Copy link

nobeh commented Apr 15, 2015

Yes, all dependencies are now using 0.7.2-SNAPSHOT, and only JGiven Maven plugin is at 0.7.1.

@janschaefer
Copy link
Contributor Author

I guess you have to update the JGiven maven plugin also to 0.7.2-SNAPSHOT

@nobeh
Copy link

nobeh commented Apr 15, 2015

Trying that yields to:

.m2/repository/com/tngtech/jgiven/jgiven-maven-plugin/0.7.2-SNAPSHOT/jgiven-maven-plugin-0.7.2-SNAPSHOT.jar), Plugin's descriptor contains the wrong version: 0.7.1 -> [Help 1]

@janschaefer
Copy link
Contributor Author

ok, I will have a look at that and tell you when you can test again

@janschaefer
Copy link
Contributor Author

ok, I have republished the artifacts to the snapshot repository. It should work now.

@nobeh
Copy link

nobeh commented Apr 15, 2015

Confirm that it works as expected. Thanks!
jgiven-tag-colors-0 7 2-snapshot

@janschaefer
Copy link
Contributor Author

Great! Thanks for testing!

@nobeh
Copy link

nobeh commented May 3, 2015

Any chance of releasing 0.7.2 soon? 😀

@janschaefer
Copy link
Contributor Author

Well, it wouldn't be a very big release, but it wouldn't hurt either ;-)

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

Successfully merging this pull request may close these issues.

None yet

3 participants