Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dev_console.js 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. const helpers = require("./global-setup");
  2. describe("Development console tests", function () {
  3. helpers.setupTimeout(this);
  4. let app = null;
  5. beforeAll(function () {
  6. // Set config sample for use in test
  7. process.env.MM_CONFIG_FILE = "tests/configs/env.js";
  8. });
  9. describe("Without 'dev' commandline argument", function () {
  10. beforeAll(function () {
  11. return helpers
  12. .startApplication({
  13. args: ["js/electron.js"]
  14. })
  15. .then(function (startedApp) {
  16. app = startedApp;
  17. });
  18. });
  19. afterAll(function () {
  20. return helpers.stopApplication(app);
  21. });
  22. it("should not open dev console when absent", async function () {
  23. await app.client.waitUntilWindowLoaded();
  24. return expect(await app.browserWindow.isDevToolsOpened()).toBe(false);
  25. });
  26. });
  27. describe("With 'dev' commandline argument", function () {
  28. beforeAll(function () {
  29. return helpers
  30. .startApplication({
  31. args: ["js/electron.js", "dev"]
  32. })
  33. .then(function (startedApp) {
  34. app = startedApp;
  35. });
  36. });
  37. afterAll(function () {
  38. return helpers.stopApplication(app);
  39. });
  40. it("should open dev console when provided", async function () {
  41. expect(await app.client.getWindowCount()).toBe(2);
  42. });
  43. });
  44. });