LOAD_PLUGINS=1 QUNIT_SKIP_CORE=1 QUNIT_SINGLE_PLUGIN='discouse-humble-box' /home/ravenstorm/.rbenv/versions/2.5.3/bin/rake qunit:test
Chrome is not installed. Download from https://www.google.com/chrome/browser/desktop/index.html
rake aborted!
Command failed with status (1): [LOAD_PLUGINS=1 QUNIT_SKIP_CORE=1 QUNIT_SIN...]
/home/ravenstorm/discourse/lib/tasks/plugin.rake:117:in `block in <main>'
Tasks: TOP => plugin:qunit
Install Chrome and then give it another try.
Oh sorry iâve pasted an old error code which i had stored in a pastebin 
navigate to http://localhost:60099/qunit?qunit_single_plugin=discouse-humble-box&qunit_skip_core=1&seed=187998423095278311109560784485973475676
Tests timed out
rake aborted!
Command failed with status (124): [node /home/ravenstorm/discourse/vendor/ass...]
/home/ravenstorm/discourse/lib/tasks/qunit.rake:89:in `block in <main>'
Tasks: TOP => qunit:test
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [LOAD_PLUGINS=1 QUNIT_SKIP_CORE=1 QUNIT_SIN...]
/home/ravenstorm/discourse/lib/tasks/plugin.rake:117:in `block in <main>'
Tasks: TOP => plugin:qunit
Try running the test in the browser as David suggested earlier. So, in your browser, when the server is running, go to your-local-site/qunit. Very often, for me, timeouts in the Terminal have errors in JS that I could see and fix after visiting /qunit on the browser.
Thats one of the problems 
I canât find acceptance tests on my /qunit
Even after turning on all modules and filtering it with box and humble nothing is here 
Try renaming the folder to test/javascripts/acceptance - that extra s is quite important!
You might need to do rm -rf tmp, and then restart your development server for the changes to take effect.
Do what David said above (rename the folder to javascripts), but ALSO, change the name of your plugin in plugin.rb to discourse-humble-box to match the folder name. I did these two changes, and I see tests locally:
Yea iâve seen those as well now, but these arenât really eye-opening results tbh.
But gotta dig deeper and lookup why these errors are shown.
Thanks for the help guys.
For example the second test case⌠if i am testing it myself by hand⌠it works, but running it on qunit it fails 
Ok, got a brief idea whats bringing me the errors and it confuses me:
http://localhost:9292/ in my browser has the plugin installed and working
http://localhost:9292/qunit the test shows, that the plugin is not even installed
I thought these two are using the same enviroment ?
Could this be caused by my local dev-enviroment since itâs not using docker and Iâm not able to install the plugin like Install Plugins in Discourse ? Itâs just sitting in the plugins folder like the others.
Any idea how this is possible ?
Sto cercando di seguire questa guida, ma mi blocco proprio allâinizio: non riesco ad accedere a /qunit. (Questo sembra anche correlato a Install Discourse on Ubuntu or Debian for Development, che è fondamentalmente lâapproccio che sto usando per distribuire Discourse sulla mia macchina locale per imparare lo sviluppo, ma questa guida è il prompt che ha innescato il mio ostacolo, quindi ho pensato di metterlo qui.) Tentare di accedervi restituisce una risposta âQuesta pagina non esiste o è privataâ.
Il controller per la route /qunit (discourse/app/controllers/qunit_controller.rb at 166fe3bb34f99bd0baa613726486ce0f13c7a992 ¡ discourse/discourse ¡ GitHub) menziona che è # only used in non-ember-cli test / dev (il commento prima di quel metodo), quindi ho provato a eseguire lâistanza con RAILS_ENV=test bundle exec rails server, ma EmberCli.enabled? è ancora true.
Quale approccio state usando per eseguire un server di sviluppo locale in modo da poter effettivamente accedere a /qunit (che probabilmente comporta la disabilitazione di EmberCLI)? (Certamente potrei star perdendo qualcosa di ovvio.)
Il nuovo percorso è /tests. Aggiornerò lâOP - grazie!
Fantastico, grazie! Si passa al prossimo ostacolo:
Questo link diretto al particolare test di accettazione restituisce lâerrore (con un backtrace):
Errore: Nessun test corrisponde al modulo "Acceptance: Purple Tentacle".
Infatti, quando cerco nel menu a discesa âModulo:â, non vedo nulla che corrisponda a âpurpleâ o âPurpleâ. Câè una nuova parte del sistema per la registrazione di plugin o dei loro test che potrebbe mancare qui?
Se cerco âpurpleâ usando la casella di testo âFiltro:â, mi porta al seguente URL: http://localhost:4200/tests?filter=purple, che mi restituisce un errore diverso:
Errore: Impossibile trovare il modulo `helpers/qunit-helpers` importato da `discourse/plugins//acceptance/purple-tentacle-test`
at missingModule (http://localhost:4200/assets/vendor.js:259:11)
Hai qualche idea su cosa potrebbe essere fuori posto qui?
Come nota a margine, lâURL /tests utilizza il route catch-all get "*url", to: 'permalinks#show' e quindi Permalink.find_by_url per risolvere effettivamente? Se è cosĂŹ, in quale punto dellâinizializzazione di Discourse viene caricata la mappatura dellâURL /tests nel database?
@jlc, grazie mille per aver provato la nostra guida e per averci tenuti aggiornati. ![]()
Ho apportato alcune modifiche al test di accettazione di esempio dellâOP per riflettere alcune nuove modifiche che stiamo utilizzando per i test di accettazione. Essenzialmente, le due modifiche sono
- importazioni e
- lâuso della costante
needsallâinterno diacceptance
Ciò dovrebbe risolvere la maggior parte dei problemi che hai menzionato. Puoi anche utilizzare alcune delle opzioni needs qui:
Dare unâocchiata allâintero file qunit-helpers sarebbe anche molto utile!
