03_model_test.js 894 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. let test_utils = require('./test_utils');
  2. let user = "./users/testuser/";
  3. module.exports = {
  4. beforeEach : function (client) {
  5. client.url('http://localhost:8124/atompm').pause(300);
  6. },
  7. 'Login' : function (client) {
  8. test_utils.login(client);
  9. },
  10. 'Load model' : function (client) {
  11. let filename = 'Formalisms/ClassicDEVS/ClassicDEVS.model';
  12. test_utils.load_model(client, [filename]);
  13. },
  14. 'Load two models' : function (client) {
  15. let filenames = [
  16. 'Formalisms/ClassicDEVS/ClassicDEVS.model',
  17. 'Formalisms/Annotation/AnnotationMM.model'
  18. ];
  19. test_utils.load_model(client, filenames);
  20. },
  21. 'Load all models' : function (client) {
  22. test_utils.getFiles(client, user, '/**/*.model', test_utils.load_model);
  23. },
  24. after : function (client) {
  25. client.end();
  26. },
  27. };