FitNesse - How to make include seamless option work? - fitnesse

I use FitNesse version 20200510. I can't get the -seamless option of !include to work: with or without the option, the border with the expandable +- always shows up. Is there a configuration to do? Example:
Page1\content.txt:
Some text on page 1
!include -seamless >Page2
Page1\Page2\content.txt:
Some text on page 2
Result when displaying Page1:
Thanks.

Related

Show head only for first page in jspdf-autotable 3.1.1

I am using jspdf-autotable for generating pdf report. I want the header text will only be shown for the first page but not working when setting this option showHead: 'firstPage'
For example: Here is a jsfiddle
Can anyone help me?
The showHead option is for the table header and will not affect the hooks. If you want to have the same behavior for the hooks you can check the data parameter data.pageNumber and conditionally draw your content base on it.

Automatically add current url before print instruction in Joomla article

I want to manually add a [Print] icon in the position of my choosing in a Joomla 3.6 article. This article will be used as a 'master' which will be copied and renamed on a weekly basis so I would like the reference to the article in the URL to be automatic. Something like this:
<div class="btn-group">Print Preview</div>
I tried using # to reference the current page etc but this meant that the entire content of the page was (all modules, headers, footers, etc) were displayed in the print preview as well as the current article.
Thank you.
p.s. BTW, "Joomla3.6" isn't a valid tag yet so I couldn't add it with my reputation of just 1!
Not sure about your goal to "Manually add a [print] icon".
The normal way:
In the joomla /adminstrator , in the menu under Content->article, in the options on the right, there is a "Show print icon" - option. This will show the print icon for all articles. You might need to style it to suit your need. This can also be configured on a per-menu - basis.
Optionally:
You could override the default output of the article template (More on output overrides here) and add the print icon wherever you need it:
Copy the file /components/com_content/views/article/tmpl/default.php to /templates/yourtemplate/html/com_content/article/default.php
Add the print icon somewhere: <div class="btn-group"><a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" ... >Print Preview</a></div>
But, you can probably use the first method. Or perhaps just move the current output of the print icon in default.php, using the override method described above.

Orbeon changed behavior for xforms:alert / xforms:h3lp

[Stackoverflow disallows the word help in the title. Hence the h3lp]
We are in the proces of moving our code from Orbeon 3.9 to Orbeon 4.x. One of the many things that changed is the behavior for display of xforms:alert and xforms:help. Example code:
<xforms:input ref="#code">
<xforms:alert ref="$resources/required-field"/>
<xforms:help ref="$helptext"/>
</xforms:input>
In Orbeon 3.9 the alert is displayed as a red img with a white exclamation mark that has the text as tooltip, only if the binding fails. The help is displayed as a blue-ish image with a question that activated a tiny pseudo window containing the (potentially large) help text.
In Orbeon 4.7 the alert text is displayed as-is, no image and no condition based on binding. This interferes with a carefully designed interface as it takes up a lot more space. The help text is not displayed at all because .xforms-help has display: none;. Overriding that doesn't work because the text would then just be displayed inline.
I could not find documentation for these changes. Does anyone know the rationale and how to make "alert" and "help" useful yet again?
There are two changes with Orbeon Forms 4.x which might be relevant to this:
The HTML layout of elements has changed a bit. This means existing CSS might have to be adapted. You can check this by comparing the HTML produced by 3.9 vs. 4.x for a given page. With 4.x, all form elements, for example, are wrapped within a <span> or <div> element.
Form Runner uses Twitter Bootstrap as a CSS library. But the Bootstrap CSS files are also included for non-Form Runner pages.
This said, "red icon" alerts should still work, see for example the good old Espresso Order or Bookcast demos.
If you see alerts inline and unconditionally, it means that somehow the proper CSS doesn't apply, either because of the HTML layout change mentioned above, or because some CSS files are missing.
Look at this post : http://blog.orbeon.com/2014/01/improving-how-we-show-help-messages.html
and this : http://discuss.orbeon.com/how-to-use-the-quot-new-quot-xforms-help-in-4-5-td4658348.html
julien

Re-use scenarios on multiple pages

I am new to Specflow and need a way to reuse scenarios in multiple feature files.
I have a web application consisting of multiple pages that each share a many items such as footer content. Say my footer contains 3 links:
Help | Feedback | FAQ
I have a scenario to test the "Help" link functionality:
Scenario: Help link
Given I am on page1
When I click on the link containing text "Help"
Then I see the help popup
As the "Given" statement specifies which page to open, the scenario is tied to that page. In order to test the same help link functionality on page2, page3, page4, etc., I would need to:
1) Copy the scenario into another feature file
2) Change the given statement to reference the correct page
3) Repeat for all pages containing the help link!
This seems like an awful lot of duplication and there must be a better way to do this.
You can use a Scenario Outline, which is basically a data driven test:
Scenario Outline: Help link
Given I am on <Page>
When I click on the link containing text "Help"
Then I see the help popup
Examples:
| Page |
| Home |
| Contact Us |
| About Us |
You can't test everything when you work at this level. In fact you can only test a fraction of whats possible. So what you have to do is think about what benefit you get for testing the footer on each other page, and see if this is worth the cost of
Writing the tests
Running the tests
Secondly you don't need to repeat all the tests for each page. If the links work on one page then they will work on every other page, so you could test the links once, and then subsequently check that the footer appears on other pages e.g.
Feature: Footer checks
Scenario: Footer appears on pages
Given a selection of pages
When each page is visited
Then each page should have the footer
and have your selection of pages be a random small sample from all the pages.

ExecCommand 'removeformat' for Firefox does not remove text-align

I have a div in the editor of FF :
<div align='right'>asdasd</div>
and
<div style="text-align:right">asdasd</div>
When I select either of these and fire this command using JS :
document.execCommand('removeformat',false,null);
These justifications are not removed. WHile this happens on Chrome.
First, take a look on Stack Overflow question Javascript: execCommand(“removeformat”) doesn't strip h2 tag and its answers.
The editing command removeFormat does in Chrome more than it should do according to currently last proposal of HTML Editing APIs. The div element is not listed as editable HTML element with local name. And text alignment is also not listed on point 7 listing the formatting properties which should be reset by this command.
The editing command removeFormat is proposed for removing formatting from text and not from blocks (paragraphs).
But the behavior of Chrome is nevertheless not wrong as at the moment (2015-01-25) there is no official standard for the HTML Editing APIs and command removeFormat. So every browser can have implemented whatever the developers of this browser thought is useful for this command.
You better code the removing of text alignment property with other methods of JavaScript.

Resources