• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Test suite for MagicMirror²

Scheduled Pinned Locked Moved Upcoming Features
42 Posts 5 Posters 37.3k Views 6 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    qistoph @strawberry 3.141
    last edited by Feb 2, 2017, 1:54 PM

    @strawberry-3.141
    How about this?
    https://github.com/qistoph/MagicMirror/commit/406ae4e8c37cbf7e31c89f5341d7715bacbcf0d2

    			try {
    				expect(fileKeys).to.deep.equal(baseKeys);
    			} catch(e) {
    				if (e instanceof chai.AssertionError) {
    					this.skip();
    				} else {
    					throw e;
    				}
    			}
    
    1 Reply Last reply Reply Quote 0
    • R Offline
      roramirez Core Contributors @qistoph
      last edited by Feb 2, 2017, 3:14 PM

      @qistoph Nice work. Related with your first point there a discussion about translations of JSON file.
      https://github.com/MichMich/MagicMirror/pull/679

      Easy module development with MagicMirror Module Template

      1 Reply Last reply Reply Quote 0
      • R Offline
        roramirez Core Contributors
        last edited by Feb 10, 2017, 10:58 PM

        Hi Guys,

        Today I’ve playing with test suite I something going me crazy

        I create the follow test
        https://github.com/roramirez/MagicMirror/commit/88f1f6bbd4fe6d7f3b9391993d207c7b9ebfb2e9

        Two check on same test case. On my enviroment ever but ever give me fail

        smirror :: ~/MagicMirror ‹without-modules-test*› » ./node_modules/mocha/bin/mocha tests/e2e/without_modules.js
        
        
          Check configuration without modules
            ✓ Show the message create file config (83ms)
            1) Show the message create file config 2
        
        
          1 passing (6s)
          1 failing
        
          1) Check configuration without modules Show the message create file config 2:
             Error: An element could not be located on the page using the given search parameters ("#module_2_helloworld .module-content").
              at elements("#module_2_helloworld .module-content") - getText.js:18:17
              at execute(, "isLoading", , "require") - api.js:350:19
        

        I pushed a sample for shared with you and these are passing on Travis
        https://travis-ci.org/roramirez/MagicMirror/jobs/200521954

        Anybody can give me some light?

        Easy module development with MagicMirror Module Template

        1 Reply Last reply Reply Quote 0
        • Q Offline
          qistoph
          last edited by Feb 11, 2017, 11:41 AM

          Weird… don’t see anything wrong with your code and it also runs fine on my machine…

          Probably not really helpful, though, sorry

          R 1 Reply Last reply Feb 11, 2017, 4:42 PM Reply Quote 0
          • R Offline
            roramirez Core Contributors @qistoph
            last edited by Feb 11, 2017, 4:42 PM

            @qistoph I’ll test in other instance.

            What S.O are you using?

            Easy module development with MagicMirror Module Template

            Q 1 Reply Last reply Feb 12, 2017, 10:31 AM Reply Quote 0
            • Q Offline
              qistoph @roramirez
              last edited by Feb 12, 2017, 10:31 AM

              @roramirez what do you mean by “S.O”?

              R 1 Reply Last reply Feb 12, 2017, 4:36 PM Reply Quote 0
              • R Offline
                roramirez Core Contributors @qistoph
                last edited by Feb 12, 2017, 4:36 PM

                @qistoph Sorry, Spanish acronymous. I mean Operating System.

                On the another hand. The same commit is passed in Travis on my personal forked but in the main Mich’s repository failed.

                https://travis-ci.org/roramirez/MagicMirror/builds/200750569 (Pass)
                https://travis-ci.org/MichMich/MagicMirror/builds/200750793 (Fail)

                It’s so weird.

                Easy module development with MagicMirror Module Template

                Q 1 Reply Last reply Feb 12, 2017, 4:52 PM Reply Quote 0
                • Q Offline
                  qistoph @roramirez
                  last edited by Feb 12, 2017, 4:52 PM

                  @roramirez my tests ran on Ubuntu.

                  The failed build you’re linking has timeouts. That’s the issue I added to the Trello board. We could increase the timeout a bit and see if it happens again in the next days.

                  Ask Mich to re-run the failed build, he should be able to click that option in Travis, being the owner of the project. See if that fails again. That resolved it for me before.

                  R 1 Reply Last reply Feb 12, 2017, 6:45 PM Reply Quote 0
                  • R Offline
                    roramirez Core Contributors @qistoph
                    last edited by Feb 12, 2017, 6:45 PM

                    @qistoph it’s pushed https://github.com/MichMich/MagicMirror/pull/716

                    Easy module development with MagicMirror Module Template

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      roramirez Core Contributors
                      last edited by Feb 20, 2017, 3:21 PM

                      Hey guys,

                      I pushed up a small refactoring for tests.
                      https://github.com/MichMich/MagicMirror/pull/728

                      This is a improvement for create new tests without unnecessary repeat inside of code.

                      Something I wasnt think now is how can be integrate the case test created by @qistoph because this is set a app.path inside of test (It’s something I have not tried…yet)

                      https://github.com/MichMich/MagicMirror/blob/e62df3b3b18cc98b65656194fa5baa53b9110fbc/tests/e2e/dev_console.js#L37

                      Easy module development with MagicMirror Module Template

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 3 / 5
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy