Code Monkey home page Code Monkey logo

Comments (10)

jediwhale avatar jediwhale commented on September 2, 2024

I would be concerned about backwards compatibility - there may be tests that rely on the rendered value appearing in the table cells.

from fitnesse.

EricD2 avatar EricD2 commented on September 2, 2024

I understand your concern, but in this case, the result depends on the style applied or the comment written : how could someone think this would be robust ?

In any case, we could offer this enhancement without changing existing widgets : one could add his own, which allow a more simple and more robust comparison.

from fitnesse.

amolenaar avatar amolenaar commented on September 2, 2024

I'm not really clear on this.

Do you mean that, if you have a table

| check | some value | !note a comment |
| check | url | http://fitnesse.org |

SliM compares the output of someValue() with <span class="note">a comment</span> and the output of url() with <a href="http://fitnesse.org">http://fitnesse.org</a>?

from fitnesse.

EricD2 avatar EricD2 commented on September 2, 2024

I don't know what really happens. Maybe Slim compares with "!note a comment" but the results get interpreted after.
Here is my Test class :

public class Test {
    public String someValue() {
        return "";
    }
    public String url() {
        return "http://fitnesse.org";
    }
}

and the result I get : http://imageshack.us/photo/my-images/593/testzk.jpg/
using

|script|Test                          |
|check |some value|!note a comment    |
|check |url       |http://fitnesse.org|

from fitnesse.

amolenaar avatar amolenaar commented on September 2, 2024

Hi,

This doesn't look sound to me. What confuses me is that you want to check the output from the someValue() call with a comment.

What you want is the ability to add additional comments to the lines in a script. For that you can also use | note | command in the script table:

|script|Test                          |
|note  |a comment about the next line |
|check |some value|                   |
|check |url       |http://fitnesse.org|

At least, that's how I use it. I tend to make the note content bold ('''text'''), so it is more visible.

from fitnesse.

EricD2 avatar EricD2 commented on September 2, 2024

Hi,

I don't want to compare to the comment, but that's what fitnesse does. Maybe if I put a value it's more understandable ? Suppose someValue() returns "someValue", the cell content would be "someValue !note this a comment explaining the value."

I know I can put additional note in a script table, that's not what I want : I want value comparison to be based on real content, not rendered one : do not take style into account, ignore comments, etc. You didn't mention the url example, don't you think the check url should pass ?

from fitnesse.

amolenaar avatar amolenaar commented on September 2, 2024

The point (problem if you like) is that tests are performed with the rendered wikitext (html). It looked weird to me when I saw that the first time (and the second time..).

I share Mike's concern about backwards compatibility, but yes: I would expect the url to pass.

A solution might be to define another test system (slim2?). With the new parser we have a better grip on how tests are handled.

from fitnesse.

jediwhale avatar jediwhale commented on September 2, 2024

FitNesse has 2 separate components - a wiki that lets you compose web pages (HTML) in a wiki markup language, and a test execution component that lets you execute HTML tables as tests. So, SLIM never sees the wiki markup - it sees the rendered HTML. What you're proposing, while doable, would be a fundamental change to this separation of concerns.

To stop the url from being rendered as a hyperlink, you can write it as a literal !-http://blah.blah-!

from fitnesse.

EricD2 avatar EricD2 commented on September 2, 2024

Thank you for your answers. I guess this is not as easy as I thought, too bad :/. Should I close this issue ?

from fitnesse.

woodybrood avatar woodybrood commented on September 2, 2024

No one got back to you on this. I think we should close this. I'll go ahead and do that. It can always be reopened if someone feels there is a strong case and provides a possible approach.

from fitnesse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.