Using Chutzpah with Visual Studio 2012. I have an HTML test harness with tests inline. But Chutzpah doesn't seem to "scan" these files so that they appear in Test Explorer.
Here's the body of my HTML. I am including the qunit.js files. But the test "Can I find a div named myDiv?" never appears in Test Explorer. Do I need to put the HTML files in a certain folder in order to be detected?
In Tools->Options->Chutzpah, I have the Testing Mode set to "All"
<div id="myDiv"></div>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script>
test("Can I find a div named myDiv?", function () {
var myDivLength = $('#myDiv').length;
equal(myDivLength, 1, "expected 1, got " + myDivLength);
});
</script>
Has anyone experienced a simliar issue? I feel like Chutzpah is putting my Javascript in its own test harness HTML file rather than using mine. But with version 2.1, the documentation states it should use those files:
http://matthewmanela.com/
Related
I am just a newbee to jhipster. finally I generated jhipster and runned an application. I tried to change static file(.html) for test.
What I did as follows.
I changed src/main/webapp/app/layouts/footer/footer.component.html file content.
('This is your footer' --> 'This is your footer !!!!!')
Executed command yarn start. Application running without problem.
I found running application footer still' This is your footer'. But footer.component.html file content still 'This is your footer !!!!!'.
I tried many times but application's footer still unchanged.
I tried compile executing command yo jhipster.
Terminal Ask overwriting footer.component.html file? so I typed 'y'
After compile I checked footer.component.html file content. but it rolled back to the original file ('This is your footer'. not 'This is your footer !!!!!')
Please Teach me what I had missed. How can I change contents of static files.
This problem makes me crazy for last 2days.
Thanks in advance.
Please let us know if you installed any language while creating the project.
If yes then jhipster uses this following library for translations, so the actual String comes from a json file.
https://angular-translate.github.io/
You can do the following.
Instead of
<div class="footer" ng-cloak>
<p data-translate="footer">This is your footer</p>
</div>
Try the following.
<div class="footer" ng-cloak>
<p>This is your footer!!!</p>
</div>
Or a better option would be to change the json file.
src/main/webapp/i18n/en/global.json
"footer": "This is your footer"
to
"footer": "This is your footer!!!"
I'm trying to distribute some SQL_SSDT Visual Studio code snippets using .vsi and .vscontent files, but I'm getting an error while installing:
The .vscontent file either contains invalid attributes or specifies a code snippet for a programming language that is not installed.
The .vscontent file is based on the documentation provided by Microsoft How to: Distribute Code Snippets
The sample on this site is the following:
<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005">
<Content>
<FileName> </FileName>
<DisplayName> </DisplayName>
<Description> </Description>
<FileContentType> </FileContentType>
<ContentVersion>2.0</ContentVersion>
<Attributes>
<Attribute name="lang" value=""/>
</Attributes>
</Content>
</VSContent>
My file looks like this:
<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005">
<Content>
<FileName>SSDTTest.snippet</FileName>
<DisplayName>SSDTTest</DisplayName>
<Description>SSDTTest</Description>
<FileContentType>Code Snippet</FileContentType>
<ContentVersion>1.0</ContentVersion>
<Attributes>
<Attribute name="lang" value="SQL_SSDT"/>
</Attributes>
</Content>
</VSContent>
I'm using the value SQL_SSDT since this is the required value in the .snippet files (<Code Language="SQL_SSDT">).
The installation starts as expected (double clicking on the .vsi file), the VS Content Installer pops up, lists the included content. The error occurs after hitting Finish. (Installation starts, but the above error pops up after a few seconds.)
The snippet is working fine if I copy it to the default snippet folder for SSDT (Documents\Visual Studio 2012\Code Snippets\SQL_SSDT\My Code Snippets) or if I'm adding it via snippet manager in SSDT, but the .vsi installation fails using the above file.
Am I missing something?
Installed VS products on this box:
SSDT
SSDT-BI
VS Express for Desktop (2012)
Update
I found the XML schema reference for the .vscontent files (VS2012), and it seems that the SQL_SSDT is not a valid value for the Lang attribute. It suggests that there are only four values available for the lang attribute. (csharp, jsharp, vb, xml).
Now the question is: Does SSDT add any extensions to this XML schema?
It seems that VS Content Installer has no support for deploying SSDT code snippets. There is a posted idea on visualstudio.uservoice.com which requests this feature, but it is still open.
I did not found any other resources related to this issue.
There is a possible workaround, which needs testing: You can create a PS/BAT which copies the snippet files into the VS's snippet folder for SSDT.
My project is a mvc4 project in visual studio 2013 ultimate.
I tryd to send my project by following the steps :
File > Export template > (leave all the options as default)
I get a zip that i unpack. If i open the unpacked solution and run the program i get alot of errors. It looks like visual studio replaced all the text that contained the projectname with $safeprojectname$. How can i export the project without visual studio replacing all the 'projectname' spots so that i can run my program.
I tryed creating a new project (console application) with no code in it, if i export it and import it i get the same message first i get :
Warning 1 Load of property 'RootNamespace' failed. The string for the root namespace must be a valid identifier. SvenEind
and after running i get
190 errors 31 warnings
I tryd importing http://www.asp.net/mvc/tutorials/getting-started-with-ef-5-using-mvc-4/building-the-ef5-mvc4-chapter-downloads and that worked for me.
So i guess the problem is in some kind of settings for exporting files.
replaced all the text that contained the projectname with $safeprojectname$
This is very much by design. You created a project template, a cookie-cutter for new projects. You are not supposed to do anything with the .zip archive. It should sit patiently in your "My Exported Templates" folder. Until the day arrives that you want to start a new project.
You then can pick the template instead of using one of the built-in ones that were preinstalled by the Visual Studio installer. Visual Studio prompts you for the project name. It then unzips the archive, copying the files into your new project directory. And modifies the files, $safeprojectname$ is substituted by the new project name you entered. You now have a good start for your new project, using the settings and assets that you saved earlier when you created the template.
Sounds like you had an entirely different use in mind, I can't guess at the intention from the question.
Hmmm. I got this error on Build:
The app manifest must be valid as per schema: Line 42, Column 18, Reason: '$safeprojectname$' violates pattern constraint of '([A-Za-z][A-Za-z0-9]*)(\.[A-Za-z][A-Za-z0-9]*)*'. The attribute 'Id' with value '$safeprojectname$' failed to parse.
So I grabbed the project name from the VS Configuration Manger and put it in the app manifest like this.
<Applications>
<Application
Id="CordovaApp.Windows10"
And the error went away and the project built. HTH.
I am getting what seems to be a very odd error in a web page. This is happening in both VS2008 and VS2012. In the following:
<div class="content_header" onclick="tierMenu(menu2,img2)">
<img id="img2" alt="Colapse Trips" height="9" src="Images/plus.gif" width="9" />
Travel Summary
</div>
clicking the plus image is supposed to change the image to a minus (expanding the item to display data). The tierMenu javascript method is called upon clicking, and it exists. But I am getting an error:
0x800a1391 - Microsoft JScript runtime error: 'img2' is undefined
"Img2" definitely exists. There is similar code in other places in the page, and they all behave the same way -- getting the same error. Odd thing is, the code is working fine in production. It's calling:
function tierMenu(objMenu,objImage)
{
if(objMenu && objImage)
{
...
}
}
It happens that my dev machine is 64-bit Windows 7. I can't imagine that this would be a problem. Any ideas?
Edited to Add: A colleague whose workstation is Win XP tried this on VS2008 and the problem did not occur. Really odd. The problem occurs on my workstation even when running outside of Visual Studio, i.e. directly from the browser using localhost.
This turns out to be a browser compatibility issue. If I put IE9 into compatibility mode the problem goes away.
It isn't the first time compatibility has beat me over the head. I will have to learn to try that first thing as soon as something weird like this happens.
Thanks to everyone who looked at this and puzzled over it with me.
We currently have an old Installshield project file (ism) handed to us by our client, created in an unknown older version of Installshield Pro. It needs updating for a new release, but all we have available is Installshield Express 2011. (The install definitely does not actually use any feature unavailable in Express; it barely needs any features at all.)
We need, however, to retrieve a list of what it does do so we can duplicate it.
Is there any way to import, convert or examine the file? (Currently Express refuses to open it at all, because it was created in full Installshield.)
If you do not use specific Professional features you may open xml files with InstallShield LE after following modifications inside
InstallShield table node:
Insert <row><td>DefaultProductConfiguration</td><td>Express</td></row> after Current Media.
Insert <row><td>Limited</td><td>1</td></row> after ISUSSignature
Change "Type" from MSI to MSIE. i.e.:
<row><td>Type</td><td>MSIE</td></row>
This is excerpt from my config file which did the trick:
<table name="InstallShield">
<col key="yes" def="s72">Property</col>
<col def="S0">Value</col>
<row><td>ActiveLanguage</td><td>1033</td></row>
<row><td>Comments</td><td/></row>
<row><td>CurrentMedia</td><td dt:dt="bin.base64" md5="332cf0a04e9833f150480c96800db728">
UgBlAGwAZQBhAHMAZQAgADEAAQBXAGUAYgAgAEMAbwBuAGYAaQBnAHUAcgBhAHQAaQBvAG4A
</td></row>
<row><td>DefaultProductConfiguration</td><td>Express</td></row>
<row><td>EnableSwidtag</td><td>1</td></row>
<row><td>ISCompilerOption_CompileBeforeBuild</td><td>1</td></row>
<row><td>ISCompilerOption_Debug</td><td>0</td></row>
<row><td>ISCompilerOption_IncludePath</td><td/></row>
<row><td>ISCompilerOption_LibraryPath</td><td/></row>
<row><td>ISCompilerOption_MaxErrors</td><td>50</td></row>
<row><td>ISCompilerOption_MaxWarnings</td><td>50</td></row>
<row><td>ISCompilerOption_OutputPath</td><td><ISProjectDataFolder>\Script Files</td></row>
<row><td>ISCompilerOption_PreProcessor</td><td>_ISSCRIPT_NEW_STYLE_DLG_DEFS</td></row>
<row><td>ISCompilerOption_WarningLevel</td><td>3</td></row>
<row><td>ISCompilerOption_WarningsAsErrors</td><td>1</td></row>
<row><td>ISTheme</td><td>InstallShield Blue.theme</td></row>
<row><td>ISUSLock</td><td>{979EF698-F570-46B1-A89A-8FB2EBA0D64F}</td></row>
<row><td>ISUSSignature</td><td>{070AD25F-E904-4DB5-92BF-40E127BD43E7}</td></row>
<row><td>Limited</td><td>1</td></row>
<row><td>LockPermissionMode</td><td>1</td></row>
<row><td>MsiExecCmdLineOptions</td><td/></row>
<row><td>MsiLogFile</td><td/></row>
<row><td>OnUpgrade</td><td>1</td></row>
<row><td>Owner</td><td/></row>
<row><td>PatchFamily</td><td>MyPatchFamily1</td></row>
<row><td>PatchSequence</td><td>1.0.0</td></row>
<row><td>SaveAsSchema</td><td/></row>
<row><td>SccEnabled</td><td>0</td></row>
<row><td>SccPath</td><td/></row>
<row><td>SchemaVersion</td><td>773</td></row>
<row><td>Type</td><td>MSIE</td></row>
</table>
Express will not open such a file. However depending on whether the file's contents are text or binary, you can either open it with any XML or text editor, or with any MSI reading tool. For the latter there's Microsoft's Orca or various alternatives that are easier to download.