I am using the Bryntum Scheduler v 2.2.5 with Exts JS 4.2.0
I have added the diagnostic tools and the console output is below.
I am using a Sch.panel.SchedulerTree.
Is this diagnostic telling me I need to set a width
for the SchedulerTree SchedulerGrid headercontainer columns?
==================== LAYOUT ====================
[E] Layout run failed
[E] ----------------- FAILURE -----------------
--schedulergridview-1036<tableview> - size: calculated/calculated
triggeredBy: count=1
headercontainer-1035.columnWidthsDone () dirty: false, setBy: ?
Cycles: 2, Flushes: 0, Calculates: 1 in 2 msec
Calculates by type:
tableview: 1 in 1 tries (1x) at 0 msec (avg 0 msec)
I added
schedulerConfig{ layout: 'auto'}
to my 'Sch.panel.SchedulerTree' and my 'Layout run failed' error is gone!
Related
my folders are
features/features_files_folder
features/steps
In features_files_folder
omniwyse.feature
code:
Feature: Omniwyse
#tagcurrent
Scenario Outline: COMPANY
Given I load the website "https://www.omniwyse.com"
When I click "About Us" page
Then verify about header element "About Us"
init.py
In steps folder
step_def_web_element_handling.py
from behave import given, when, then
from step_impl_web_element_handling import webapp
#given(u'I load the website "{url}"')
def step_impl(context,url):
webapp.load_website(url)
#when(u'I click "About Us" page')
def step_impl_goto_page(context):
webapp.goto_page()
#then(u'verify about header element "{component}"')
def step_impl_verify_component(context, component):
webapp.verify_component_exists(component)
step_impl_web_element_handling.py
from selenium import webdriver
driverpath = "/Users/giris/Downloads/chromedriver"
class WebApp:
def __init__(self):
pass
# self.driver.get("https://omniwyse.com/")
def load_website(self, url):
driver = webdriver.Chrome(executable_path = driverpath)
driver.get(url)
def goto_page(self):
driver = webdriver.Chrome(executable_path = driverpath)
driver.find_element_by_xpath("//a[normalize-space()='About Us']").click()
def verify_component_exists(self, component):
# Simple implementation
driver = webdriver.Chrome(executable_path = driverpath)
assert component in driver.find_element_by_xpath("//h1[contains(text(),'About Us')]"), \
"Component {} not found on page".format(component)
webapp = WebApp()
my errors for step_def_web_element_handling
{
"resource": "/c:/Users/giris/OneDrive/Documents/pythonassignment/omni/features/steps/step_def_web_element_handling.py",
"owner": "python",
"code": "no-name-in-module",
"severity": 8,
"message": "No name 'then' in module 'behave'",
"source": "pylint",
"startLineNumber": 4,
"startColumn": 1,
"endLineNumber": 4,
"endColumn": 1
}
same for given, when
output when run using behave command
Using default path "./features" Trying base directory:
C:\Users\giris\OneDrive\Documents\pythonassignment\omni\features
Feature: Omniwyse # features/feature_files_folder/omniwyse.feature:1
1 feature passed, 0 failed, 0 skipped 0 scenarios passed, 0 failed, 0
skipped 0 steps passed, 0 failed, 0 skipped, 0 undefined Took 0m0.000s
Desired output:
Using default path "./features" Trying base directory:
C:\Users\giris\OneDrive\Documents\pythonassignment\omni\features
Feature: Omniwyse # features/feature_files_folder/omniwyse.feature:1
1 feature passed, 0 failed, 0 skipped 1 scenario passed, 0 failed, 0
skipped 3 steps passed, 0 failed, 0 skipped, 0 undefined Took 0m0.000s
In omniwyse.feature
Replace scenario outline with scenario
I am trying to create a vm with vagrant with multiple disks, but I want the vagrantfile to use a loop to create them. Vagrant does not handle loops correctly as it seems to double or triple traverse the loop. Then Vagrant fails as it already created disk1.vdi
Warning: I am no expert on Ruby...
I have tried using arrays and ruby's .each method. Tried a while loop. All fail with the same problem.
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.provider "virtualbox" do |v|
Drives = [1,2,3,4,5]
Drives.each do |hd|
puts "harddrive #{hd}"
v.customize ['createhd', '--filename', "./disk#{hd}.vdi",'--variant', 'Fixed', '--size', 20 * 1024]
v.customize ['storageattach', :id, '--storagectl', 'IDE', '--device', hd+1, '--type', 'hdd', '--medium', "./disk#{hd}.vdi"]
end
end
end
What I expect is a vm with 5+1 drives
what I get is
$ vagrant up
harddrive 1
harddrive 2
harddrive 3
harddrive 4
harddrive 5
/home/brian/projects/centos/Vagrantfile:7: warning: already initialized constant Drives
/home/brian/projects/centos/Vagrantfile:7: warning: previous definition of Drives was here
harddrive 1
harddrive 2
harddrive 3
harddrive 4
harddrive 5
/home/brian/projects/centos/Vagrantfile:7: warning: already initialized constant Drives
/home/brian/projects/centos/Vagrantfile:7: warning: previous definition of Drives was here
harddrive 1
harddrive 2
harddrive 3
harddrive 4
harddrive 5
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'centos/7' version '1905.1' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2200 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
A customization command failed:
["createhd", "--filename", "./disk1.vdi", "--variant", "Fixed", "--size", 20480]
The following error was experienced:
#<Vagrant::Errors::VBoxManageError: There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["createhd", "--filename", "./disk1.vdi", "--variant", "Fixed", "--size", "20480"]
Stderr: 0%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage: error: Failed to create medium
VBoxManage: error: Could not create the medium storage unit '/home/brian/projects/centos/disk1.vdi'.
VBoxManage: error: VDI: cannot create image '/home/brian/projects/centos/disk1.vdi' (VERR_ALREADY_EXISTS)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium
VBoxManage: error: Context: "RTEXITCODE handleCreateMedium(HandlerArg*)" at line 462 of file VBoxManageDisk.cpp
>
Please fix this customization and try again.
I think the important parts are the --portcount at storagectl and the unless File.exist? to avoid trying to recreate the disks
servers = [
{ :hostname => "node01", :ip => "192.168.1.10", :memory => "2048", :disks => 2 },
{ :hostname => "node02", :ip => "192.168.1.20", :memory => "2048", :disks => 2 },
{ :hostname => "node03", :ip => "192.168.1.30", :memory => "2048", :disks => 2 },
]
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
servers.each do |conf|
config.vm.define conf[:hostname] do |node|
node.vm.hostname = conf[:hostname]
node.vm.network "private_network", ip: conf[:ip]
node.vm.provider "virtualbox" do |vb|
vb.customize ['storagectl', :id, '--name', 'SATA Controller', '--portcount', conf[:disks]+1]
(1..conf[:disks]).each do |x|
file_to_disk = './disk_'+conf[:hostname]+'_'+x.to_s()+'.vdi'
unless File.exist?(file_to_disk)
vb.customize ['createhd', '--filename', file_to_disk, '--size', 20 * 1024]
end
vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', x, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
vb.memory = conf[:memory]
end
end
end
end
I'm using selenium-side-runner v 3.11.0 to attempt to run a test against a Chrome browser from teh command line. How do I wait to execute a command until an element is visible (note: not "present" but visible). I was reading this -- https://ui.vision/docs/selenium-ide/waitforvisible -- and thought "waitForVisible" could work, but when I insert this in my ".side" test ...
{
"id": "fbf35ed7-1a28-4540-a93d-3cb8ba0e012a",
"comment": "",
"command": "waitForVisible",
"target": "id=user_login",
"targets": [],
"value": ""
}
It dies with the below error ....
localhost:selenium davea$ PATH=/Users/davea/Documents/workspace/starter_project/selenium/dev/:$PATH selenium-side-runner --headless -c "browserName=chrome" /tmp/81a312ad-8fe1-4fb0-b93a-0dc186c3c585.side
info: Running /tmp/81a312ad-8fe1-4fb0-b93a-0dc186c3c585.side
FAIL ./DefaultSuite.test.js (5.462s)
Default Suite
✕ myTest (3726ms)
● Default Suite › myTest
Unknown command waitForVisible
12 | return element.click();
13 | });
> 14 | throw new Error("Unknown command waitForVisible");
| ^
15 | await driver.wait(until.elementLocated(By.id(`user_login`)), configuration.timeout);
16 | await driver.findElement(By.id(`user_login`)).then(element => {
17 | return element.clear().then(() => {
at Object.<anonymous>.tests.myTest (commons.js:14:9)
at Object.<anonymous> (DefaultSuite.test.js:11:5)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 5.595s, estimated 6s
selenium-side-runner (the command line runner) seems to be broken in this regard. https://github.com/SeleniumHQ/selenium-ide/issues/643
Let's say I have this configuration
val scn = (name: String) => scenario(name)
.forever() {
.exec(request)
}
setUp(
scn("scn1").inject(atOnceUsers(1))
.throttle(
jumpToRps(1), holdFor(10 seconds)
),
scn("scn2").inject(atOnceUsers(1))
.throttle(jumpToRps(1), holdFor(20 seconds))
).protocols(http.baseURLs(url))
I would expect to run the whole simulation for 20 seconds - until all is finished. What actually happens is that the simulation is stopped after 10 seconds, right after the first scenario finishes.
---- Requests ------------------------------------------------------------------
> Global (OK=20 KO=0 )
> scn1 / HTTP Request (OK=10 KO=0 )
> scn2 / HTTP Request (OK=10 KO=0 )
---- scn1 ----------------------------------------------------------------------
[--------------------------------------------------------------------------] 0%
waiting: 0 / active: 1 / done:0
---- scn2 ----------------------------------------------------------------------
[--------------------------------------------------------------------------] 0%
waiting: 0 / active: 1 / done:0
================================================================================
Simulation foo.Bar completed in 10 seconds
To overcome this in general, I need to configure all scenarios that ends earlier then the final one to wait with zero throttle.
setUp(
scn.inject(atOnceUsers(1))
.throttle(
jumpToRps(1), holdFor(10 seconds),
jumpToRps(0), holdFor(10 seconds) // <-- added wait
),
scn.inject(atOnceUsers(1))
.throttle(jumpToRps(1), holdFor(20 seconds))
).protocols(http.baseURLs(url))
Is this expected behavior? What other options do I have to make my simulation run until all scenarios are finished or until maxDuration?
Possible explanation could be that Feeder loops on data and when there is no more data it exists. In this case call "circular" on your feeder so that it goes back to the top of the sequence once the end is reached
I followed the tutorial from https://medium.com/#chvanikoff/phoenix-react-love-story-reph-1-c68512cfe18 and developed an application but with different versions.
elixir - 1.3.4
phoenix - 1.2.1
poison - 2.0
distillery - 0.10
std_json_io - 0.1
The application ran successfully when running locally.
Bur when created a mix release(MIX_ENV=prod mix release --env=prod --verbose) and ran rel/utopia/bin/utopia console(the otp application name was :utopia), I ran into error
Interactive Elixir (1.3.4) - press Ctrl+C to exit (type h() ENTER for help)
14:18:21.857 request_id=idqhtoim2nb3lfeguq22627a92jqoal6 [info] GET /
panic: write |1: broken pipe
goroutine 3 [running]:
runtime.panic(0x4a49e0, 0xc21001f480)
/usr/local/Cellar/go/1.2.2/libexec/src/pkg/runtime/panic.c:266 +0xb6
log.(*Logger).Panicf(0xc210020190, 0x4de060, 0x3, 0x7f0924c84e38, 0x1, ...)
/usr/local/Cellar/go/1.2.2/libexec/src/pkg/log/log.go:200 +0xbd
main.fatal_if(0x4c2680, 0xc210039ab0)
/Users/alco/extra/goworkspace/src/goon/util.go:38 +0x17e
main.inLoop2(0x7f0924e0c388, 0xc2100396f0, 0xc2100213c0, 0x7f0924e0c310, 0xc210000000, ...)
/Users/alco/extra/goworkspace/src/goon/io.go:100 +0x5ce
created by main.wrapStdin2
/Users/alco/extra/goworkspace/src/goon/io.go:25 +0x15a
goroutine 1 [chan receive]:
main.proto_2_0(0x7ffce6670101, 0x4e3e20, 0x3, 0x4de5a0, 0x1, ...)
/Users/alco/extra/goworkspace/src/goon/proto_2_0.go:58 +0x3a3
main.main()
/Users/alco/extra/goworkspace/src/goon/main.go:51 +0x3b6
14:18:21.858 request_id=idqhtoim2nb3lfeguq22627a92jqoal6 [info] Sent 500 in 1ms
14:18:21.859 [error] #PID<0.1493.0> running Utopia.Endpoint terminated
Server: 127.0.0.1:8080 (http)
Request: GET /
** (exit) an exception was raised:
** (Protocol.UndefinedError) protocol String.Chars not implemented for {#PID<0.1467.0>, :result, %Porcelain.Result{err: nil, out: {:send, #PID<0.1466.0>}, status: 2}}
(elixir) lib/string/chars.ex:3: String.Chars.impl_for!/1
(elixir) lib/string/chars.ex:17: String.Chars.to_string/1
(utopia) lib/utopia/react_io.ex:2: Utopia.ReactIO.json_call!/2
(utopia) web/controllers/page_controller.ex:12: Utopia.PageController.index/2
(utopia) web/controllers/page_controller.ex:1: Utopia.PageController.action/2
(utopia) web/controllers/page_controller.ex:1: Utopia.PageController.phoenix_controller_pipeline/2
(utopia) lib/utopia/endpoint.ex:1: Utopia.Endpoint.instrument/4
(utopia) lib/phoenix/router.ex:261: Utopia.Router.dispatch/2
goon got panicked and hence the porcelain. Someone please provide a solution.
Related issues: https://github.com/alco/porcelain/issues/13
EDIT: My page_controller.ex
defmodule Utopia.PageController do
use Utopia.Web, :controller
def index(conn, _params) do
visitors = Utopia.Tracking.Visitors.state
initial_state = %{"visitors" => visitors}
props = %{
"location" => conn.request_path,
"initial_state" => initial_state
}
result = Utopia.ReactIO.json_call!(%{
component: "./priv/static/server/js/utopia.js",
props: props
})
render(conn, "index.html", html: result["html"], props: initial_state)
end
end