how i can change the text in header of reports?
form "TestCafe Test Summary" to custom header
<h1 class="text-primary">TestCafe Test Summary</h1>
It looks like this text is hardcoded in the source code of the testcafe-reporter-html plugin: https://github.com/picuscreative/testcafe-reporter-html/blob/1e2868a3303c2e4f26951ea9c1f0b724be7d5a10/src/index.js.
You can create a pull request with some changes that will make this text configurable.
Related
I'm using TestCafe for test automation of a web application based on the Wicket framework. I try to type text into a text input field ... well, actually it is a dropdown list, where a text input field appears, so that the user can search for certain codes. The HTML fragment is as follows:
HTML fragment
And here is the corresponding screenshot (text field above "001"):
Text input field with dropdown
The user can type some characters and the list below is automatically filtered (I did this manually):
Text input field with some text
My TestCafe test tries this:
.click( productcodeList )
.expect( productcodeInputField.visible ).ok()
.click( productcodeInputField )
.typeText( productcodeInputField, 'ABW' )
i.e.
Click on the drop down list.
Assume that the text input field is now visible (works fine).
Click on the text input field (this should not be necessary, since typeText() is supposed to do this anyway).
Type the text "ABW" into the text input field ==> This does not work.
I'm sure that my Selector works, since the assertion (expect) is successful and when I debug the test run after the second click (on the text input field), I see the following:
TestCafe screenshot
I.e. the cursor is directly on the text field, but somehow TestCafe cannot write the text into the field.
Some additional information: The Selector for the input field is created as follows:
productcodeInputField = Selector('span').withAttribute('class', /select2-dropdown.*/ ).child('span').withAttribute('class', /select2-search.*/ ).child('input').withAttribute('class', 'select2-search__field' );
More information: I'm using the same logic on the same page:
kurzbezeichnungField = Selector('input').withAttribute('name', /.*aeAbbreviation.*/);
...
await t.click( kurzbezeichnungField )
.typeText( kurzbezeichnungField, 'xxxWWW' )
and this works fine.
Node.js version: v10.16.3
Testcafe version: 1.5.0
This issue looks like a bug. However, I cannot say it precisely without an example that demonstrates the problem.
My team would really appreciate it if you share your project or sample to demonstrate the issue.
Please create a separate issue in the TestCafe github repository using the following template and provide as much additional information as possible.
I'm new to pug i had create a sample file as shown below:
.row
.col-md-12
.tile
.row
.col-lg-6
form
.form-group
label(for='exampleInputEmail1') Email address
input#exampleInputEmail1.form-control(type='email', aria-describedby='emailHelp', placeholder='Enter email')
This code works fine but when I paste the below code:
.form-group
label(for='hii') hii
My browser keeps loading and after a few minutes it shows "This page isn’t working", but if I remove the hii label it again works properly.
I get an error saying "Invalid indentation, you can use tabs or spaces but not both"
In this case, the error message explains a lot.
In your editor make sure that you are using the setting that converts tabs to spaces, and make sure your tab space is "2". That's what pug is expecting.
To fix your file, do a search and replace from tab to two spaces.
I am using InteliJ and really love using it. One of the questions I have is this:
Is there a way to create code short cuts?
For instance, while bug testing, I am forever writing:
<?php die(var_dump($var)); ?>
and figured it would be great to have a shortcut key to automate this. i.e.
"Cmd Option D"
or something similar to dump the pre-defined statement into my code...
Any thoughts on this?
You can use Live Templates:
To define a template go to Settings/Live templates, then select group or create new group of templates and hit the green plus button and select Live Template.
In the abbreviation field type for example vd which will be the trigger for your snippet, define context, which represents the languages this template will be available for and put this in the Template Text field:
<?php die(var_dump($SELECTION$)); ?>
The $SELECTION$ part is a variable which represents current selection.
Now when you are in editor, you can just type vd and hit Tab. That will expand your snippet and put your cursor inside var_dump().
You can event type the variable name you want to dump, select it, hit CTRL+ALT+T, which will show you a Surround with dialog, where you can choose your template. After you select it your variable name will be surrounded with the var_dump snippet.
Another way to invoke a live template is to hit CTRL+J which will show you autocomplete popup with the available templates.
I want to change default header template of grid. I do not know what config or property to set. I tried "renderTpl" , "tpl" , "metaRowTpl" but these property related to row in grid, where i want to change header.
Any example or link would be great.
Like above image, I want extra header/row/column-header in between where text will come from database (and basically it is filter information).
You change the header text with the following command
yourGrid.getView().getHeaderAtIndex(columnIndex).setText('Header Text');
http://jsfiddle.net/alexrom7/YNTuN/3/
the current theme is connected with
dojo.require("dojox.charting.themes.PlotKit.green");
I created my theme, saved it in the same folder and tried to add to page:
dojo.require("mytheme");
But it's not connecting this way.
If you created your own module, the easiest thing to do is to place it in the folder, which is a peer of dojo:
dojo/...
dijit/...
dojox/...
my/... <- your file goes there
For example, it is called "mytheme". In this case it should go into my/mytheme.js file. In order to use it just require it and set on your chart:
dojo.require("my.mytheme");
...
chart.setTheme(my.mytheme);
Don't forget to put dojo.provide("my.mytheme"); at the top of your theme file, and define my.mytheme object (your theme).
Alternatively include it inline like I did in http://lazutkin.com/download/hicharts.html (look for myTheme). Or you can include the snippet using a regular <script> tag.
Do not forget to set your new theme explicitly on a chart: chart.setTheme(your_theme_object).