How do I get coloured output back for Cucumber in ConEmu? - cucumber

Cucumber gives coloured output in Windows 7 (64-bit) command prompt with ANSICON 1.6.0, but no longer in the ConEmu terminal manager.
Cucumber
Cucumber.yml exists in \config folder
Cucumber.yml contains default: --color
ConEmu
Settings > Features > Inject ConEmuHk is checked
Settings > Features > ANSI X3.64 / xterm 256 colors is checked
%ConEmuANSI% returns "ON"
ls --color does return coloured output
Version status: 141004 preview
ConEmu appears to be fine, yet Cucumber appears to be configured correctly as well considering coloured output works in the command prompt. Any ideas?
Example output from Cucumber, as requested (these passing steps would previously show in green):
Scenario: Visit the client site # client\features\age_gate.feature:8
Given I am a new visitor # client/features/step_definitions/age_gate.rb:1
When I visit the client website # client/features/support/navigation.rb:1
Then I am shown the age gate # client/features/step_definitions/age_gate.rb:6

Old build was used. Update to latest alpha.

Related

VS Code integrated terminal doesn't launch GUI applications

While I'm able to run scripts from Ubuntu terminal, the integrated terminal on VS Code doesn't run correctly when it comes to launching GUI applications. Consider these examples:
PIL Example
from PIL import Image
img = Image.open('image.png')
img.show()
Behavior on System Terminal: Launches default image viewer
Behavior on VS Code Integrated Terminal: A warning is printed (Gtk-WARNING cannot open display)
Browser / Plotly Example
import plotly.graph_objects as go
fig = go.Figure(
data=[go.Bar(y=[2, 1, 3])],
layout_title_text="A Figure Displayed with fig.show()"
)
fig.show()
Behavior on System Terminal: Launches default web browser
Behavior on VS Code Integrated Terminal: Nothing
Text Editor Example
git rebase -i origin/main
Behavior on System Terminal: Launches default text editor
Behavior on VS Code Integrated Terminal: Nothing
I have reported this bug here but I'm think it may not be a bug.
Probably the DISPLAY variable is not set in your VS code shell. Find out the value in your working system terminal:
echo $DISPLAY
Then set the value in VS Code via the terminal.integrated.env.<platform> setting. Press Ctrl+Shift+P and search for Preferences: Open Settings (JSON). Add the following entry to the settings file:
"terminal.integrated.env.linux": {
"DISPLAY": "<your-display-value>"
}
Then close and re-open VS Code's terminal. Afterwards, running echo $DISPLAY there should output the same value as in your system terminal. This should make GUI applications launchable.

TYPO3 10.4.16 cli commands missing?

checking which cli commands my installation of TYPO3 10.4.16 offers with php typo3 list in directory /var/www/html/typo3_src/typo3/sysext/core/bin I only get very few commands offered (output of command see below).
E.g. the scheduler extension is installed and works fine when commands are executed manually. Therefore I would expect to at least get the command scheduler:run offered in the cli list.
The Installation is non-composer as the server is behind heavy firewalls.
Has anyone experienced similar behaviour?
Any help is much appreciated.
Thanks,
Ben
Result of list-command:
TYPO3 CMS 10.4.16 (Application Context: Production)
Usage:
command [options] [arguments]
Options:
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Displays help for a command
list Lists commands
language
language:update Update the language files of all activated extensions
upgrade
upgrade:list List available upgrade wizards.
upgrade:run Run upgrade wizard. Without arguments all available wizards will be run.
Solved:
When calling the typo3 script, the CWD has to be the root of your TYPO3 Installation while executing the command.
This works:
navigate to root folder of TYPO3
php typo3/sysext/core/bin/typo3
This doesn't work:
navigation to /typo3/sysext/core/bin/
execute php typo3

When running a command in Intellij, how do I make filenames clickable in the output?

I have a grunt task that I've configured in IntelliJ 11 (sadly can't upgrade to 12 yet). The output of the command contains filenames when there is a problem. I've basically followed the configuration example I saw in the Karma setup video at http://www.youtube.com/watch?v=MVw8N3hTfCI (instructions start at 7:39 but the feature is demonstrated at 10:40).
I've created a new Node.js run configuration, put in the correct path to node, changed the path to the file to be grunt and then listed the Application parameters to be what they should. It runs fine.
The output of my grunt task spits out filenames with absolute paths followed by a colon and a line number, just like in that example. I'm curious why my files aren't clickable though.
I'd expect the path in the last line of this to be clickable:
PhantomJS 1.9.1 (Mac OS X) CookiesTests test set, get, and delete cookie FAILED
AssertError: expected "js-test-value" not to be equal to "js-test-value"
at /Users/matt/Projects/task-core/test/cookies.jstd:17
And it should open the file test/cookies.jstd to line 17.
Is there an opportunity to configure IntelliJ so that it recognizes the output as having file names so that it can activate links?

Rspec colors with Conemu

I'm trying to get colors to show up on my Windows 7 x64 machine when running rspec. I've tried console2 and ansicon but that makes Ruby crash. I've got ConEmu installed and Ruby runs again but I'm not getting any colors for rspec. Also in lines I expect to see color, they are preceded by text like [31m or [36m (this also occurs with cmd.exe).
Thanks for any help
Sharon
To enable ANSI X3.64 processing in ConEmu you must enable two options on "Features" page:
"Inject ConEmuHk"
"ANSI X3.64 / xterm 256 colors"
In fact, if you need ANSI processing in the root process only (cmd.exe for example) - there is no need in enabling "Inject ConEmuHk". But in most cases, when you run smth (which uses ANSI) from root shell - "Injects" are required.
ATM, latest alpha version recommended, there was some lags in the current stable build.

Remove warning about ansicon from "rake cucumber"

When you run any rake task with cucumber installed on a machine that doesn't have ANSICON installed, you get the following message:
*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows
When running locally I like using ANSICON, but when used within the build server I don't care about that - and I don't want to see that warning there. Is there a way to get rid of it?
You can actually remove the warning itself. I do not like installing a bunch of garbage just for the sake of having a green word. So, to remove the warning:
1. Locate the Cucumber installation in gems directory (it's in the Ruby installation directory). For me it was: lib\ruby\gems\1.9.1\gems\cucumber-1.2.0
2. In the cucumber-1.2.0\lib\cucumber\formatter directory of the Cucumber installation find the file ansicolor.rb
3. Locate the line:
STDERR.puts %{*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows}
and add # in front of it to comment it out:
# STDERR.puts %{*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows}
The line number was 14 for my version of Cucumber.
4. Save the file and you're done
Download and unzip the file from http://adoxa.altervista.org/ansicon/
open cmd and navigate to the unzipped folder
Navigate to x64 (if you have a 64 bit machine) otherwise navigate to x86
Type ansicon.exe -h and you will get help of this command
Execute 'ansicon.exe -i' to install and add ansicon to your Windows
Run your cucumber 0.10.0 test and you should
get the coloured output result on Windows
Can you add an exception to you spec_helper.rb? Or perhaps try adding a tag which you filter on when using rake?

Resources