Cypress is being run in CircleCI inside a docker via command:
command: npx cypress run --headless --browser chrome
It prints too much info as well as Cypress tests results as:
base_1 | 127.0.0.1 - - [18/May/2021:19:52:18 +0000] "GET /roof.svg HTTP/1.1" 200 547 "http://
I want to omit these requests logs.
According to cypress docs Paste this in cypress/support/index.js
Cypress.Server.defaults({
delay: 500,
force404: false,
whitelist: (xhr) => {
// handle custom logic for whitelisting
return true;
}
})
Related
I'm trying to make Home Assistant button/switch, which changes state of my lamp through REST call.
I got set up server with command, which changes state of lamp on 192.168.43.21/lampSwitch and returns json {"state": "ON"} or OFF, based on after-switching state.
I'm facing problem with scripting entities and showing current/returned state in Hassio - acquiring state and changing it via home-screen switch.
My configuration:
# Loads default set of integrations. Do not remove.
default_config:
# Text to speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
rest:
- scan_interval: 5
resource: http://192.168.43.21/
sensor:
- name: "Temperatura"
# unique_id: "sensor.temperature_sensor"
json_attributes_path: "$.response.system"
value_template: "{{value_json['temperature']}}"
json_attributes:
- "temperature"
- name: "Wilgotność powietrza"
# unique_id: "sensor.humidity_sensor"
json_attributes_path: "$.response.system"
value_template: "{{value_json['humidity']}}"
json_attributes:
- "humidity"
- name: "Poziom wody"
# unique_id: "sensor.water_sensor"
json_attributes_path: "$.response.system"
value_template: "{{value_json['water']}}"
json_attributes:
- "water"
lamp_switch:
- command: "Lamp switch"
trigger:
platform:
action:
url: http://192.168.43.21/lampSwitch/
I saw solution which uses cURL and command line, but I couldn't find any suiting example.
Note that the rest entities works just fine (shows up at home screen).
Thank you in advance
I use this to launch applications on my Samsung TV. I define my_command in Configuration.yaml, then use:
/bin/bash -c "/usr/bin/curl -X POST 'http://<<My_IP>>:8001/api/v2/applications/'{{ variables.my_command }}"
I call this from a button and pass a variable that defines the application that I want.
I hope this helps.
I am new to saltstack and I am trying to run a job using the SaltStack Config.
I have a master and minion(Windows machine).
the init.sls file is the following:
{% set machineName = salt['pillar.get']('machineName', '') %}
C:\\Windows\\temp\\salt\\scripts:
file.recurse:
- user: Administrator
- group: Domain Admins
- file_mode: 755
- source: salt://PROJECTNAME/DNS/scripts
- makedirs: true
run-multiple-files:
cmd.run:
- cwd: C:\\Windows\\temp\\salt\\scripts
- names:
- ./dns.bat {{ machineName }}
and the dns.bat file:
Get-DnsServerResourceRecordA -ZoneName corp.local
The main idea is to create DNS record, but for now I am trying to run only this command to check things out, but I get the following info message when I run the job:
"The minion has not yet returned. Please try again later."
I went to check out in the master and ran the command: salt-run manage.status and got the following:
salt-run manage.status
/usr/lib/python3.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.23) or chardet (4.0.0) doesn't match a supported version!
RequestsDependencyWarning)
down:
- machine1
- machine2
- machine3
up:
- saltmaster
I tried some commands, to restart the machines, but still no success.
Any help would be appreciated! Thanks in advance!
My ultimate goal is to have tests run automatically anytime a container is updated. For example, if update /api, it should sync the changes between local and the container. After that it should automatically run the tests... ultimately.
I'm starting out with Hello World! though per the example:
# DevSpace --version = 5.16.0
version: v1beta11
...
hooks:
- command: |
echo Hello World!
container:
imageSelector: ${APP-NAME}/${API-DEV}
events: ["after:initialSync:${API}"]
...
I've tried all of the following and don't get the desired behavior:
stop:sync:${API}
restart:sync:${name}
after:initialSync:${API}
devCommand:after:sync
At best I can just get Hello World! to print on the initial run of devspace dev -b, but nothing after I make changes to the files for /api which causes files to sync.
Suggestions?
You will need a post-sync hook for this, which is separate from the DevSpace lifecycle hooks. You can define it with the dev.sync directly and it looks like this:
dev:
sync:
- imageSelector: john/devbackend
onUpload:
execRemote:
onBatch:
command: bash
args:
- -c
- "echo 'Hello World!' && other commands..."
More information in the docs: https://devspace.sh/cli/docs/configuration/development/file-synchronization#onupload
I am using the below code to override the BUILD_LOG functionality but i am not getting the complete console log.
Code :
emailext body: '''$PROJECT_NAME - Build # $BUILD_NUMBER - FAILURE:
Check console output at $BUILD_URL to view the results. ${BUILD_LOG, maxLines=50, escapeHtml=false}''', replyTo: 'noreply#bwpm.dumpmail', subject: '$PROJECT_NAME - Build # $BUILD_NUMBER - FAILURE!', to: 'santhuhappy24#gmail.com'
Jenkins version i am using : Jenkins 2.79
Regards,
Santhohs
You are limiting the Build log to give only the last 50 lines. So instead of that please use a large number so that it will give you total log of the console.
${BUILD_LOG, maxLines=999999, escapeHtml=false}
I haven't seen getting full log using $BUILD_LOG it only give 250 lines which is default. I have tested using that number. Hope this helps for you too.
I'm very green to Ember testing, but have found a lot of useful documentation for it online so far (thank you people!). One of the issues I'm hitting here, though, is I cannot get a test to fail. Strange, I know. For example, I have the following:
import {
module,
test
} from 'qunit';
module("Example tests");
test("This is an example test", function(assert) {
assert.equal(1, 1, "Ember knows 1 is equal to 1");
});
test("This is another example test", function(assert) {
assert.notEqual(1, 2, "Ember knows 1 is not equal to 2");
});
test("This is a 3rd example test", function(assert) {
assert.equal(1, 2, "Luke, you're an idiot");
});
However, if I run the ember-cli command: ember test
It says everything passes..
$ ember test
Future versions of Ember CLI will not support v0.10.38. Please update to Node 0.12 or io.js.
version: 0.2.2
A new version of ember-cli is available (0.2.3). To install it, type ember update.
Could not find watchman, falling back to NodeWatcher for file system events.
Visit http://www.ember-cli.com/#watchman for more info.
Built project successfully. Stored in "/Users/luke/Examples/iris/tmp/class-tests_dist-DYvAvX3c.tmp".
ok 1 PhantomJS 1.9 - JSHint - .: app.js should pass jshint
ok 2 PhantomJS 1.9 - JSHint - helpers: helpers/resolver.js should pass jshint
ok 3 PhantomJS 1.9 - JSHint - helpers: helpers/start-app.js should pass jshint
ok 4 PhantomJS 1.9 - JSHint - .: router.js should pass jshint
ok 5 PhantomJS 1.9 - JSHint - .: test-helper.js should pass jshint
ok 6 PhantomJS 1.9 - JSHint - unit: unit/ExampleTest.js should pass jshint
1..6
# tests 6
# pass 6
# fail 0
# ok
What am I doing wrong here???
When in doubt look to the docs, tests need to end with a -test.js in order to run.