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 ?
أحاول اتباع هذا الدليل، ولكني عالق في البداية: لا يمكنني الوصول إلى /qunit على الإطلاق. (يبدو أن هذا يتعلق أيضًا بـ https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-ubuntu-for-development/14727/، وهو في الأساس النهج الذي أستخدمه لنشر Discourse على جهازي المحلي للتعلم عن التطوير، ولكن هذا الدليل هو الذي أدى إلى عقبتي، لذلك فكرت في طرحه هنا.) محاولة الوصول إليه تعطي استجابة “هذه الصفحة غير موجودة أو خاصة”.
يشير المتحكم لمسار /qunit (discourse/app/controllers/qunit_controller.rb at 166fe3bb34f99bd0baa613726486ce0f13c7a992 · discourse/discourse · GitHub) إلى أنه # يستخدم فقط في اختبارات غير ember-cli / التطوير (التعليق قبل تلك الطريقة)، لذلك حاولت تشغيل المثيل باستخدام RAILS_ENV=test bundle exec rails server، ولكن EmberCli.enabled? لا يزال true.
ما هو النهج الذي تستخدمونه لتشغيل خادم تطوير محلي بحيث يمكننا بالفعل الوصول إلى /qunit (والذي ربما يتضمن تعطيل EmberCLI)؟ (من المؤكد أنني قد أكون أغفل شيئًا واضحًا.)
المسار الجديد هو /tests. سأقوم بتحديث المنشور الأصلي - شكرًا!
رائع، شكرًا! إلى العقبة التالية:
هذا الرابط المباشر للاختبار المحدد للقبول يعطي الخطأ (مع تتبع الأخطاء):
خطأ: لم تتطابق أي اختبارات مع الوحدة "Acceptance: Purple Tentacle".
بالفعل، عندما أبحث في قائمة التحديد “Module:”، لا أرى شيئًا يطابق “purple” أو “Purple”. هل هناك جزء جديد في النظام لتسجيل الإضافات أو اختباراتها قد يكون مفقودًا هنا؟
إذا بحثت عن “purple” باستخدام مربع النص “Filter:”، فإنه يأخذني إلى عنوان URL التالي: http://localhost:4200/tests?filter=purple، والذي يعطيني خطأ مختلفًا:
خطأ: تعذر العثور على الوحدة `helpers/qunit-helpers` المستوردة من `discourse/plugins//acceptance/purple-tentacle-test`
في missingModule (http://localhost:4200/assets/vendor.js:259:11)
هل لديك أي أفكار حول ما قد يكون في غير مكانه هنا؟
على الهامش، هل يستخدم عنوان URL /tests المسار الشامل get "*url", to: 'permalinks#show'، وبالتالي Permalink.find_by_url لحل المشكلة فعليًا؟ إذا كان الأمر كذلك، ففي أي نقطة من تهيئة Discourse يتم تحميل تعيين عنوان URL /tests في قاعدة البيانات؟
@jlc، شكرًا جزيلاً لك على تجربة دليلنا وإبقائنا على اطلاع دائم. ![]()
لقد أجريت بعض التغييرات على اختبار القبول للمثال الخاص بصاحب الموضوع ليعكس بعض التغييرات الجديدة التي نستخدمها لاختبارات القبول. في الأساس، التغييران هما:
- الاستيرادات، و
- استخدام الثابت
needsضمنacceptance
يجب أن يحل هذا معظم المشكلات التي ذكرتها. يمكنك أيضًا الاستفادة من بعض خيارات needs هنا:
الاطلاع على ملف qunit-helpers بأكمله سيكون مفيدًا جدًا أيضًا!
