How to display Label in Wijmo map(wj-Flex-Pie-data-label not working) - label

wj-flex-map #map header="Average Temperature By State" [tooltipContent]="tooltipContent" class="d-inline-block">
<wj-geo-map-layer #layer url="assets/US.json" [itemFormatter]="myItemFormatter" (itemsSourceChanged)="zoomTo(layer)" >
<wj-color-scale [colors]="colors" [binding]="binding" [scale]="scale" format='n0"°F"'></wj-color-scale>
</wj-geo-map-layer>
<wj-flex-chart-legend position="Left"></wj-flex-chart-legend>
</wj-flex-map>
<!-- <wj-flex-pie-data-label [itemFormatter]="states"></wj-flex-pie-data-label> --
I have tried with this one but its still not working. Kindly help somebody.

Related

how to get value of evaluate in Jelly

I am fresh to use Servicenow glides.
I followed the guide and wrote a piece of jelly file like below,
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:c="/lib/credentials" xmlns:s="/lib/samples">
<g:evaluate var="jvar_the_output" object="true" jelly="true">
var outPuts = 'helloworld';
outPuts;
</g:evaluate>
<h1>--${jvar_the_output}--</h1>
</j:jelly>
I am thinking to print the big helloworld on the page, but I see below contents print on page directly.
var outPuts = 'helloworld';outPuts;
----
Can someone help to check what is the problem?

Illegal characters in path vs2017 loop output window

I have VS2017 installed and I am connecting to VSTS online.
The Output window (Show output from Source Control - Team Foundation) is filling up with Illegal characters in path. output.
I don't know why. I have seen this appear a few times on other projects but never investigated why. Today I had a chance to catch the problem.
The structure of the project is as follows:
FullStackAspNetCore\.editorconfig
FullStackAspNetCore\database
FullStackAspNetCore\docs
FullStackAspNetCore\Files.txt
FullStackAspNetCore\FullStackAspNetCore.sln
FullStackAspNetCore\FullStackAspNetCore.vssscc
FullStackAspNetCore\src
FullStackAspNetCore\test
FullStackAspNetCore\.vs\config
FullStackAspNetCore\.vs\FullStackAspNetCore
FullStackAspNetCore\.vs\config\applicationhost.config
FullStackAspNetCore\.vs\FullStackAspNetCore\v15
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\Acme.FullStack.SqlServerDB.dbmdl
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\Acme.FullStack.SqlServerDB.sqlproj
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\Acme.FullStack.SqlServerDB.sqlproj.user
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\Acme.FullStack.SqlServerDB.sqlproj.vspscc
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\bin
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\dbo
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\Import Schema Logs
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\obj
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\scripts
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\bin\Debug
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\bin\Release
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\bin\Debug\Acme.FullStack.SqlServerDB.dacpac
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\bin\Debug\Acme.FullStack.SqlServerDB.dll
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\bin\Debug\Acme.FullStack.SqlServerDB.pdb
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\dbo\Tables
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\dbo\Tables\ApplicationRoles.sql
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\dbo\Tables\ApplicationUsers.sql
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\dbo\Tables\__EFMigrationsHistory.sql
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\Import Schema Logs\Acme.FullStack.SqlSe_20170629095103.log
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\obj\Debug
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\obj\Debug\Acme.FullStack.SqlServerDB.dll
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\obj\Debug\Acme.FullStack.SqlServerDB.pdb
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\obj\Debug\Acme.FullStack.SqlServerDB.sqlproj.FileListAbsolute.txt
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\scripts\dev
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\scripts\dev\insert dev data.sql
FullStackAspNetCore\docs\Entity Framework.md
FullStackAspNetCore\src\Acme.FullStack.Data.EF
FullStackAspNetCore\src\Acme.FullStack.Data.Model
FullStackAspNetCore\src\Acme.FullStack.Web
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Acme.FullStack.Data.EF.csproj
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Acme.FullStack.Data.EF.csproj.vspscc
FullStackAspNetCore\src\Acme.FullStack.Data.EF\appsettings.json
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Contexts
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Migrations
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin\Debug
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin\Debug\netcoreapp1.1
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.deps.json
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.dll
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.pdb
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.dll
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.pdb
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Contexts\ApplicationDbContext.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Contexts\AuthenticationDbContext.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Contexts\AuthenticationDbContextFactory.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Migrations\20170629093101_InitialCreate.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Migrations\20170629093101_InitialCreate.Designer.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Migrations\AuthenticationDbContextModelSnapshot.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Acme.FullStack.Data.EF.csproj.nuget.g.props
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Acme.FullStack.Data.EF.csproj.nuget.g.targets
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\project.assets.json
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.AssemblyInfo.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.csproj.FileListAbsolute.txt
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.csprojResolveAssemblyReference.cache
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.dll
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.pdb
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\CoreCompileInputs.cache
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
FullStackAspNetCore\src\Acme.FullStack.Data.Model\Acme.FullStack.Data.Model.csproj
FullStackAspNetCore\src\Acme.FullStack.Data.Model\Acme.FullStack.Data.Model.csproj.vspscc
FullStackAspNetCore\src\Acme.FullStack.Data.Model\Authentication
FullStackAspNetCore\src\Acme.FullStack.Data.Model\bin
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj
FullStackAspNetCore\src\Acme.FullStack.Data.Model\Authentication\ApplicationRole.cs
FullStackAspNetCore\src\Acme.FullStack.Data.Model\Authentication\ApplicationUser.cs
FullStackAspNetCore\src\Acme.FullStack.Data.Model\bin\Debug
FullStackAspNetCore\src\Acme.FullStack.Data.Model\bin\Debug\netcoreapp1.1
FullStackAspNetCore\src\Acme.FullStack.Data.Model\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.deps.json
FullStackAspNetCore\src\Acme.FullStack.Data.Model\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.dll
FullStackAspNetCore\src\Acme.FullStack.Data.Model\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.pdb
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Acme.FullStack.Data.Model.csproj.nuget.g.props
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Acme.FullStack.Data.Model.csproj.nuget.g.targets
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\project.assets.json
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.AssemblyInfo.cs
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.csproj.FileListAbsolute.txt
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.csprojResolveAssemblyReference.cache
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.dll
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.pdb
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\CoreCompileInputs.cache
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
FullStackAspNetCore\src\Acme.FullStack.Web\Acme.FullStack.Web.csproj
FullStackAspNetCore\src\Acme.FullStack.Web\Acme.FullStack.Web.csproj.vspscc
FullStackAspNetCore\src\Acme.FullStack.Web\bin
FullStackAspNetCore\src\Acme.FullStack.Web\obj
FullStackAspNetCore\src\Acme.FullStack.Web\Program.cs
FullStackAspNetCore\src\Acme.FullStack.Web\Properties
FullStackAspNetCore\src\Acme.FullStack.Web\Startup.cs
FullStackAspNetCore\src\Acme.FullStack.Web\wwwroot
FullStackAspNetCore\src\Acme.FullStack.Web\bin\Debug
FullStackAspNetCore\src\Acme.FullStack.Web\bin\Debug\netcoreapp1.1
FullStackAspNetCore\src\Acme.FullStack.Web\bin\Debug\netcoreapp1.1\Acme.FullStack.Web.deps.json
FullStackAspNetCore\src\Acme.FullStack.Web\bin\Debug\netcoreapp1.1\Acme.FullStack.Web.dll
FullStackAspNetCore\src\Acme.FullStack.Web\bin\Debug\netcoreapp1.1\Acme.FullStack.Web.pdb
FullStackAspNetCore\src\Acme.FullStack.Web\bin\Debug\netcoreapp1.1\Acme.FullStack.Web.runtimeconfig.dev.json
FullStackAspNetCore\src\Acme.FullStack.Web\bin\Debug\netcoreapp1.1\Acme.FullStack.Web.runtimeconfig.json
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Acme.FullStack.Web.csproj.nuget.g.props
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Acme.FullStack.Web.csproj.nuget.g.targets
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug
FullStackAspNetCore\src\Acme.FullStack.Web\obj\project.assets.json
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\Acme.FullStack.Web.AssemblyInfo.cs
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\Acme.FullStack.Web.csproj.FileListAbsolute.txt
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\Acme.FullStack.Web.csprojResolveAssemblyReference.cache
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\Acme.FullStack.Web.dll
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\Acme.FullStack.Web.pdb
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\CoreCompileInputs.cache
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
FullStackAspNetCore\src\Acme.FullStack.Web\Properties\launchSettings.json
Does anyone know where to look to start diagnosing this?
Quick & Dirty solution:
Focus on the output window, hit 'Esc'.
Other have pointed that disabling the "Source Control - Team Foundation" menu bar solves the issue.
https://developercommunity.visualstudio.com/content/problem/166821/illegal-characters-in-path-being-emitted-continuou.html

recording a vector of the received power for each vehicle

I'm working on a project with veins. I would like to record for each vehicle the received power.
I did the following:
I defined in the TraciDemo11p.h
cOutVector received_power;
in the TraciDemo11p.c I added the following headers
#include "veins/base/phyLayer/PhyToMacControlInfo.h"
#include "veins/modules/phy/DeciderResult80211.h"
and i added a small code to the function onData(WaveShortMesage *msg)
void TraCIDemo11p::onData(WaveShortMessage* wsm) {
findHost()->getDisplayString().updateWith("r=16,green");
annotations->scheduleErase(1, annotations->drawLine(wsm->getSenderPos(), mobility->getPositionAt(simTime()), "blue"));
power= (DeciderResult80211*)((PhyToMacControlInfo*)wsm->getControlInfo())->getDeciderResult()->getRecvPower_dBm() ;
received_power.record(power);
if (mobility->getRoadId()[0] != ':') traciVehicle->changeRoute(wsm->getWsmData(), 9999);
if (!sentMessage) sendMessage(wsm->getWsmData());
}
after running simulation I don't find the vector received_power in the results, please can somebody help me.
thank in advance.
You forgot to set a name of output vector. Add the line:
received_power.setName("Received power");
in initialize().
hello I found the solution, Just i had to build the project each time now it works thank you anyway.

soapui how to get the list of nodes by using local-name in xpath expression?

I am using soapui for automation testing. I am trying to write a xpath expression to do the property transfer with following xml
<snapshots query="after=2014-04-16 12:30:00-0700" mask="op" xmlns="http://ws.example.com/roma/201907" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AsOf>2014-04-16T19:20:44-07:00</AsOf>
<offers>
<offer entityId="6500588"/>
<offer entityId="6500589"/>
<offer entityId="6500590"/>
<offer entityId="6557335">
<rubber>KJM</rubber>
<code>B44733</code>
<offerCode>PA</offerCode>
<status name="Completed">C</status>
<startDate basis="GMT-4">2013-04-01</startDate>
<endDate basis="GMT-4">2014-04-15</endDate>
<template>
<sourceKey-Ref entityId="36KTV" code="KPA513C36KTV" uri="/snapshot/sourcekey/36KTV"/>
<pTemplateCode>PPAKXC</pTemplateCode>
<panelCode>HPA5LTM</panelCode>
<itemCode>PA1467</itemCode>
</template>
<venue code="28">
<supervenue>5</supervenue>
</venue>
<currencyDetail currency="USD">
<unitPrice>29.95</unitPrice>
<numberPayments>1</numberPayments>
</currencyDetail>
<hData>
<legacyScriptCode>300</legacyScriptCode>
<hpKeycode>189161</hpKeycode>
<hpProductNumber>014399</hpProductNumber>
<hpMpgCode>300</hpMpgCode>
</hData>
</offer>
<offer entityId="6557336">
<rubber>KJM</rubber>
<code>B44734</code>
<offerCode>VY</offerCode>
<status name="Completed">C</status>
<startDate basis="GMT-4">2013-04-01</startDate>
<endDate basis="GMT-4">2014-04-15</endDate>
<template>
<sourceKey-Ref entityId="36KTV" code="KPA513C36KTV" uri="/snapshot/sourcekey/36KTV"/>
<pTemplateCode>PPAKXC</pTemplateCode>
<panelCode>HPA5LTM</panelCode>
<offerCode>OVYC8UM9</offerCode>
<itemCode>VY4023</itemCode>
</template>
<venue code="28">
<supervenue>5</supervenue>
</venue>
<currencyDetail currency="USD">
<unitPrice>0.00</unitPrice>
<numberPayments>1</numberPayments>
</currencyDetail>
<hData>
<legacyScriptCode>947</legacyScriptCode>
<hpKeycode>189162</hpKeycode>
<hpProductNumber>602185</hpProductNumber>
<hpMpgCode>947</hpMpgCode>
</hData>
</offer>
<offer entityId="6557337">
<rubber>KJM</rubber>
<code>B44736</code>
<offerCode>VY</offerCode>
<status name="Completed">C</status>
<startDate basis="GMT-4">2013-04-01</startDate>
<endDate basis="GMT-4">2014-04-15</endDate>
<template>
<sourceKey-Ref entityId="36KTV" code="KPA513C36KTV" uri="/snapshot/sourcekey/36KTV"/>
<pTemplateCode>PPAKXC</pTemplateCode>
<panelCode>HPA5LTM</panelCode>
<offerCode>OVYC8UMA</offerCode>
<itemCode>VY4012</itemCode>
</template>
<venue code="28">
<supervenue>5</supervenue>
</venue>
<currencyDetail currency="USD">
<unitPrice>0.00</unitPrice>
<numberPayments>1</numberPayments>
<firstPaymentAmount>0.00</firstPaymentAmount>
<firstShippingAmount>5.98</firstShippingAmount>
</currencyDetail>
<hData>
<legacyScriptCode>947</legacyScriptCode>
<hpKeycode>189163</hpKeycode>
<hpProductNumber>602094</hpProductNumber>
<hpMpgCode>947</hpMpgCode>
</hData>
</offer>
</offers>
</snapshots>
I would like to have all hpKeycode using local-name() in the XPath expression. I tried
//*[local-name()='hpKeycode']
but this gives me only the first node which is 189161. This
/*[local-name()='hpKeycode'][2]
also does not work. Any help would be greatly appreciated.
You can try with XQuery. In the property transfer step select Use XQuery checkbox as you see in the image below. And use this code:
declare namespace soap='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace ns1='http://ws.example.com/roma/201907';
<ns1:offer>
{
for $id in //*[local-name()='hpKeycode'] return string($id)
}
</ns1:offer>
EDIT:
If you want to avoid the use of XQuery, you can add three Transfers on your property transfer, on each one use:
First id
(//*[local-name()='hpKeycode'])[1]
Second id
(//*[local-name()='hpKeycode'])[2]
Third id
(//*[local-name()='hpKeycode'])[3]
Hope this helps,
This would not work in the way you expect it to because you are pulling a single set of values. You would need to specify what node branch you want further up the tree.
Its like road ways... if you were giving someone directions you would need to inform them which way to go for each fork in the road. Lets say you wanted to tell them how to get to one of 3 possible airports each located in a different city. If you said "as you arrive at airports 1,2, and 3 enter the 2nd". They would be baffled and say something like "what city though?" and maybe "its not possible for them to exist in the same location".
Solution:
Here is what you would want given the xml you provided (both work in soapui).
Xpath 2.0
//*:offer[4]/*:hData/*:hpKeycode
//*:offer[5]/*:hData/*:hpKeycode
//*:offer[6]/*:hData/*:hpKeycode
Xpath 1.0
//*[local-name()='offer'][4]/*[local-name()='hData']/*[local-name()='hpKeycode']
//*[local-name()='offer'][5]/*[local-name()='hData']/*[local-name()='hpKeycode']
//*[local-name()='offer'][6]/*[local-name()='hData']/*[local-name()='hpKeycode']
Hope this more detailed explanation helps!

spec and fabrication validating mailer. Fabrication::UnfabricatableError: No class found for

I'm validating a mailer using rspec.
The problem is that when I want to test the diffusion (multiple deliverers mailer) rspec give me an error.
my Fabricator:
Fabricator(:message) do
email(count: 1) {"proof#example.com" }
subject:"Hackety-hack email"
body:"This is an email from hackety-hack.com"
end
Fabricator(:diffusion) do
email(count: 3) {"proof#{i}#example.com" }
subject:"Hackety-hack email"
body:"This is an email from hackety-hack.com"
end
In my message_mailer_spec.rb I have
it "Works the diffusion" do
diffusion.to.should eq(["proof#example.com", "proof2#example.com"])
end
When I try to pass the tests give me a lot of errors. The main (i think):
10) MessageMailer Works the diffusion
Failure/Error: let(:diffusion) { MessageMailer.new_message(Fabricate(:diffusion), Array("proof#example.com", "proof2#example.com", "proof3#example.com"))}
Fabrication::UnknownFabricatorError:
No Fabricator defined for 'diffusion'
Why? I already created the diffusion.
Can anyone helps me?
Thanks in advance
If the Diffusion object is not a ruby model, the fabrication gem has trouble locating it. At to what i can see it looks like its a sub-class of the Message model.
try this:
Fabricator(:diffusion, from: message) do
email(count: 3) {"proof#{i}#example.com" }
subject:"Hackety-hack email"
body:"This is an email from hackety-hack.com"
end
That should solve the error. For more info on defining Fabricators check here

Resources