ember.js ember generate acceptance-test does not generate a test file - ember.js

I am trying to learn ember by following the tutorial that they have on their website.
One of the section was about generating a test file by running ember generate acceptance-test super-rentals which is supposed to generate a file under tests/acceptance/ and show this in the terminal
$ ember generate acceptance-test super-rentals
installing acceptance-test
create tests/acceptance/super-rentals-test.js
However, when I run the command it only shows:
% ember g acceptance-test super-rentals
installing acceptance-test
And it does not create any files under the tests folder.
I can't seem to find anything relate to this on stack overflow.
Does anyone know why this is not working?

there was a regression in ember 4.4 recently -- the fix hasn't been released yet, so you'll need to downgrade ember-source to ~4.3.0
Here is the reported issue(s):
https://github.com/emberjs/ember.js/issues/20081
https://github.com/emberjs/ember.js/issues/20088
And the fixing PR: https://github.com/emberjs/ember.js/pull/20082

Related

Ember not generating model files

Trying to use the cli to generate model files but no files get generated.
I run:
ember generate model blurbs
and it returns these two lines without any mention of actual files being generated (like app/models/blurbs.js)
installing model
installing model-test
I was able to generate my routes (ember g route blurb) correctly before but for models it lists no files and none are generated either.
This is my setup:
ember-cli: 3.11.0
ember-data: 3.11.2
node: 12.6.0
os: win32 x64
This is a known issue in Ember 3.11.x:
You can read about it here: https://blog.emberjs.com/2019/07/15/ember-3-11-released.html (Search for "Important Note")
For now, I recommend downgrading to Ember Data 3.10.
The bug has been fixed here, and should be in a future version of Ember Data, but the fix has not been backported to 3.11.
Update: Fixed in Ember Data 3.11.4

XC UI Testing with AWS device farm giving error "Setup Test skipped: Not enough suites found to execute"?

Archive the project and created the IPA file with development profile after that followed the following link to create the UITest IPA
http://docs.aws.amazon.com/devicefarm/latest/developerguide/test-types-ios-xctest-ui.html
also to reconfirm whether I am doing any wrong checked the following tutorial
https://www.mobdesignapps.fr/blog/2016/9/17/running-your-test-on-aws-device-farm?utm_source=stackoverflow&utm_medium=answer&utm_term=37184633
where the steps stated
Prepare Your iOS XCTest UI Tests
Before you upload iOS XCTest UI tests to Device Farm for testing, make sure that your iOS XCTest UI test runner bundle is contained within a properly formatted .ipa file. To create an .ipa file, you can place your my-project-nameUITest-Runner.app bundle in an empty Payload directory. Next, archive the Payload directory into a .zip file and then change the file extension to .ipa. The *UITest-Runner.app bundle is produced by Xcode when you build your project for testing, and it can be found in the Products directory for your project.
But whatever I do getting the following error and my test getting skipped
Setup Test skipped: Not enough suites found to execute
Didn't understand what I have to do to make it working and can anyone please help to figure out the problem? Thanks in advance.
Try using Device farm's custom environment. The standard environment has a parsing step which can fail. If it does then this error will appear since it can't find the suites.
Sounds like your UITest target does not have any UITests defined. That's what the Suites found to execute message probably means. Does your UITest target define any tests?
I've found that it doesn't like Swift tests. Try switching to Obj-C.
A colleague of mine had the same problem, and his solution was to build using Xcode 10 instead of Xcode 11, which seems like an AWS bug to me.

error when building newly initialized addon

After I had troubles building/serving an addon I'm working at, I did the usual steps to heal (delete node_modules, npm clean, npm install, ...) with no success.
So finally I'm at the stage where I newly created a fresh addon via ember addon jeff-table to port the 'old' not working repo to there....
Addon-creation was successful:
installing addon
create .bowerrc
....
create .npmignore
Successfully initialized git.
Installed packages for tooling via npm.
Installed browser packages via Bower.
Anyway, again I get the same errors when trying to build the untouched addon:
Cannot read property '0' of undefined
TypeError: Cannot read property '0' of undefined
at EmberAddon.EmberApp._initVendorFiles (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\broccoli\ember-app.js:317:55)
at EmberAddon.EmberApp [as appConstructor] (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\broccoli\ember-app.js:94:8)
at new EmberAddon (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\broccoli\ember-addon.js:38:8)
at module.exports (C:\users\jefff\google drive\www\ember-addons\jeff-table\ember-cli-build.js:6:13)
at Class.module.exports.Task.extend.setupBroccoliBuilder (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\models\builder.js:55:
19)
at Class.module.exports.Task.extend.init (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\models\builder.js:89:10)
at new Class (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\node_modules\core-object\core-object.js:18:12)
at Class.module.exports.Task.extend.run (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\tasks\serve.js:15:19)
at C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\commands\serve.js:64:24
I suspected GDrive to have messed up my node_modules or smth, but on a fresh installation this could not be the case (with GDrive switched of).
I have not touched installation of ember-cli (not that I know of).
Does anybody have an idea of what could be wrong here?
ember-cli: 2.5.0
node: 4.2.2
os: win32 x64
Try setting a lodash dependency in your package.json to a version older than 4.17.0. It's a dependency of ember-cli and was updated last night. I had the same error and stack trace with one of my company's projects this morning, it compiled last night in the CI system but failed this morning with no changes to the project. I compared the downloaded dependencies, and a couple had new versions. The first difference was lodash, so I added the 4.16.6 version to my package.json (the version that worked last night) and my project compiled again.
I'm still a novice when it comes to Node, so there may be a better solution, but this isn't the first time I was able to resolve a compilation break by forcing npm to get an older version of a dependency.
the same issue hit my projects as well.
#Bloomy you are right,
error comes from here
/node_modules/ember-cli/lib/broccoli/ember-app.js:317:55
by short debugging it appear that the issue with accessing a property from an object which isn't exist, because, as I guess, lodash 'avoid deep cloning of ._omit result' https://github.com/lodash/lodash/commit/6c427b7a260183685b16d2624351529cda25ce81 .
If you will put version of lodash in ember-cli to some version which goes before (just for your local version) - you will see it works. Not possible for production yet. Going to open a ticket in ember-cli addon if isn't opened yet :)
I was also facing the same issue and raised the following issue in github
https://github.com/ember-cli/ember-cli/issues/6432
And found out that the recent release of lodash i.e. lodash#4.17.0 has a little bug in it which is breaking things. So till a patch is released, try using lodash#4.16.5, this should solve your problem for now.

How can I get source maps to work when running tests using ember-qunit for an ember app built on ember-cli

I have an Ember app built using ember-cli and I'm writing my tests using the ember-qunit testing adapter and running them in the browser using testem as instructed in the ember-cli documentation. Although debugging in Google Chrome works fine when I'm interesting with my app, I am unable to use many debugging features such as breakpoints when running my tests.
I often run into a problem that my tests fail despite my actual app seeming to work properly, and to investigate the problem I would like to step through code while my tests are running.
But when I step into code that appears in vendor.js I just just see the following contents in my vendor.js:
// Please wait a bit.
// Compiled script is not shown while source map is being loaded!
These two lines are lines 6 & 7 of the file. The lines before this are blank, and these two lines are the last lines in the file. The debugger has the first line of the file highlighted as if that's the current location in the source, but it cannot show the source for some reason.
I can proceed to step through the code, but I can't see anything.
However, if I find vendor.js in the list of sources in the developer tools sources file list then it opens as a separate source tab and I can see all my code. At this point I have two tabs labeled vendor.js, one with all my vendor assets and one with just those line quoted above.
I am guessing that there is something different between how my tests are served and how my app is served in the development environment that is confusing Chrome.
I am using the following versions of things:
ember 1.9.1
ember-data 1.0.0-beta.14.1
ember-cli 0.1.9
qunit 1.17.1
ember-qunit 0.2.0
testem 0.6.33
Although I've poked around a bunch I don't really have any leads on where the problem is stemming from. Perhaps it's related to how testem is running the tests? Or could it be something that gets included in my tests has a messed up source map?
I appreciate any help or ideas.
I'm on ember-cli 0.2.2.
I ran across this problem as well and found this Chrome issue with processing sourcemaps.
People commenting on the issue suggest using the Chrome Canary build for now:
I'm currently using the Canary build to put breakpoints in and debug my ember code.
Get it here: https://www.google.com/chrome/browser/canary.html

Subversion and DBUnit - How to download a specific snapshot version

I posted a question to the DBunit mailing list about an error I see when I compile my program. One of the response I get is shown below:
Please try 2.4.9-SNAPSHOT (you will have to build from source;
snapshots are not currently pre-built). I believe commit 1209 fixes
the problem you are experiencing:
I looked at the DBunit project and I can't figure out how to download this specific version.
I tried this command but it comes back with a Does not exist error
svn checkout https://dbunit.svn.sourceforge.net/svnroot/dbunit/trunc/2.4.9-SNAPSHOT dbunit
I think the command is correct because if I try a release that does exist it does work. For example the following command works
svn checkout https://dbunit.svn.sourceforge.net/svnroot/dbunit/tags/dbunit-2.4.8 dbunit
Looking at the online code browser I can't see an entry with the tag I want. See Example at http://dbunit.svn.sourceforge.net/viewvc/dbunit/
Does this mean that the 2.4.9-SNAPSHOT does not exist or am I doing it wrong?
Also, what does the SNAPSHOT label mean at the end of the release version? I have seen this used quite a lot but not really sure what it means.
Thanks
Just download the source code in specified revision:
$ svn co https://dbunit.svn.sourceforge.net/svnroot/dbunit/trunk dbunit -r 1209
$ cd dbunit
$ mvn clean install
The 2.4.9-SNAPSHOT version should appear in your repository when the build finishes. However I encounter some problems while building it, the com.oracle:ojdbc14:jar:10.2.0.4.0 cannot be found. Consult library developers how to fix this.