Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get any tests to work...many missing files, etc. #31

Open
ca0v opened this issue Nov 5, 2014 · 6 comments
Open

Can't get any tests to work...many missing files, etc. #31

ca0v opened this issue Nov 5, 2014 · 6 comments

Comments

@ca0v
Copy link

ca0v commented Nov 5, 2014

Using

  • put-selector 0.3.6 (not 0.3.2)
  • dojo 1.11.0-pre
  • dijit 1.11.0-pre

Errors

  • standalone.html: missing font-awesome.css and many errors
  • testPut.html: put.js does not exist
  • tutorial.html: dozens of errors
  • try-it.html: converter.js not found
  • testCore.html: blank form
  • testHtml5Elements.html: looking for expression, base, elemental, utils in xstyle/test/core which I was able to fix only to discover that testHtml5Elements.css imports a non-existent ext.css

The xstyle design is a beautiful thing but critical functionality seems broken and these tests are not helping to dissuade me.

@kriszyp
Copy link
Owner

kriszyp commented Nov 5, 2014

Clearly I need to go through and clean up the testing area. This directory has seen a lot of experimental tests that have not been maintained, and I have been working on (slowly) moving xstyle's testing to use intern. And of course, as you can see there is definitely a lot of experimentation that has happened. Currently the intern tests should be passing, but I haven't maintained the tests outside of the intern tests. Indeed I will work on moving these tests to intern or deleting them. If you need any help with setting up the intern tests, let me know. I have been using intern in sibling package mode, which differs from the typical child package mode.

@ca0v
Copy link
Author

ca0v commented Nov 5, 2014

Switching to the https://github.com/SitePen/xstyle repository allowed me to study working tests enough to get module() working.

I believe I should start with dgrid to get oriented with intern, but yes, I would like help setting up xstyle tests.

@ca0v
Copy link
Author

ca0v commented Nov 7, 2014

I've become comfortable with the intern and have written some simple xstyle tests. I would really like a pointer to your intern tests for xstyle. I'm presently trying to understand the implications of this comment:

Note, that simply using the plugin loader will not load xstyle,
and trigger parsing of the stylesheet, so you will not be able to use the extensions,
unless you have specifically included the xstyle module as well.

I was hoping as long as xstyle/main is loaded we could load a stylesheet via the plugin and it would trigger parsing. How is this accomplished? elemental.update() seems to do the trick.

@kriszyp
Copy link
Owner

kriszyp commented Nov 7, 2014

You should be able to use xstyle/main as the css loader plugin, if you want to ensure the parsing and extensions are enabled. So rather than 'xstyle/css!stylesheet.css', use 'xstyle/main!stylesheet.css'.

@ca0v
Copy link
Author

ca0v commented Nov 7, 2014

Okay, so when loading xstyled css after the document is ready it's necessary use the xstyle/main! plugin? I've found that if xstyle/main is already loaded it doesn't work. Here's code which delays loading the xstyled css and further delays creation of a node to be xstyled:

//require(['xstyle/main']); //  uncomment and the page will not be xstyled
setTimeout(function() {
    require(['xstyle/core/elemental', 'xstyle/main!./css/query-builder.css'], function (elemental) {
        setTimeout(function() {
            var node = put(body, "div.query-builder-widget.landscape-tiny", "form 2");
            elemental.update(node);
        }, 2000);
    });
}, 2000);

I guess elemental.update() is the postCreate() or startup() of xstyle controls.

@kriszyp
Copy link
Owner

kriszyp commented Nov 7, 2014

I am having a difficult time reproducing this exact issue. I am seeing an issue, but it is related to double loading and rendering, which I will fix.

I would describe elemental.update as more analagous to the parser.parse(node) of xstyle, I think.

kriszyp added a commit that referenced this issue Nov 9, 2014
Avoid duplicate loading of stylesheets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants