GithubHelp home page GithubHelp logo

gtm-datalayer-test's People

Contributors

sahava avatar thyngster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gtm-datalayer-test's Issues

Add more examples

More examples are needed, each with their own test spec and configuration JSON.

  • Failing test
  • Multiple browsers
  • Multiple pages
  • Complex structure using subset check only
  • Complex JSON validation

Come up with a better alternative to the "not" : { "items" : { "not" pattern

Currently the only way (I have found) to test if an array (window.dataLayer) simply contains an object is to use the

"type" : "array
"not" : {
    "items" : {
        "not" : {
            "type" : "object",
            "properties" : ...

pattern as used in /lib/testUtils.js. However, this is not only really ugly, but it also lacks proper validation error messages. If the test fails, the only thing the reporter knows is that the spec validated against a "not" condition. The reporter doesn't know what part of the spec failed. That's why there's the "FAILED ON: " workaround, where I expose the object on which the test failed in the error message.

As far as I know, there's not much to do about this yet. There's the "contains" keyword coming up (hopefully) in a future JSON Schema draft, but even then I'm not certain if it's descriptive enough.

So we need to figure out how to properly do an "array contains..." so that the validation error is still expressive enough to be informative.

connect econnrefused 127.0.0.1:4444

After errorless npm install stops npm test after http-server ./examples -s. On hard break appears an error

ERROR: connect ECONNREFUSED 127.0.0.1:4444 phantomjs at new RuntimeError (C:\gtm-datalayer-test\node_modules\webdriverio\build\li b\utils\ErrorHandler.js:143:12) at Request._callback (C:\gtm-datalayer-test\node_modules\webdriverio\build\l ib\utils\RequestHandler.js:330:43) at self.callback (C:\gtm-datalayer-test\node_modules\webdriverio\node_module s\request\request.js:185:22) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at Request.onRequestError (C:\gtm-datalayer-test\node_modules\webdriverio\no de_modules\request\request.js:877:8) at emitOne (events.js:121:20) at ClientRequest.emit (events.js:211:7) at Socket.socketErrorListener (_http_client.js:387:9) at emitOne (events.js:116:13).

Error: reporter "wdio-spec-reporter" is not installed

Current master throws an error when installing from scratch:

/home/work/gtm-datalayer-test/node_modules/webdriverio/build/lib/launcher.js:162
throw _iteratorError;
^

Error: reporter "wdio-spec-reporter" is not installed. Error: Error: Cannot find module 'wdio-spec-reporter'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Launcher.initReporters (/home/work/gtm-datalayer-test/node_modules/webdriverio/build/lib/launcher.js:137:41)
at new Launcher (/home/work/gtm-datalayer-test/node_modules/webdriverio/build/lib/launcher.js:73:31)
at Object. (/home/work/gtm-datalayer-test/node_modules/webdriverio/build/lib/cli.js:426:20)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at Launcher.initReporters (/home/work/gtm-datalayer-test/node_modules/webdriverio/build/lib/launcher.js:139:35)
at new Launcher (/home/work/gtm-datalayer-test/node_modules/webdriverio/build/lib/launcher.js:73:31)
at Object. (/home/work/gtm-datalayer-test/node_modules/webdriverio/build/lib/cli.js:426:20)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)

Get rid of wdio

Let's start thinking of getting rid of wdio. The only reason I chose wdio was because I wanted a test runner up as fast as possible.

Without wdio, we could setup Selenium, phantomjs, mocha, chai using e.g. Grunt to do the package and script handling.

Then, we could have more freedom to incorporate more complex interactions between the client and the server, such as adding https://github.com/google/data-layer-helper and run assertions when dataLayer.push() commands are registered. This way we could test each dataLayer.push() against the JSON as they come in, rather than the pretty complex method currently used to test the dataLayer as one big JSON lump.

Add support for navigation

Navigation support needs to be added. Basically anything that triggers a dataLayer.push() should be something you can write a test to.

Will need to figure out how to represent navigation in the JSON configuration, though.

Add support for reporting results to a GSheet

Hi Simo,

If you find it to be a good fit, I'd like to include some functionality we've been working on here at Napkyn Inc. We're a heavy user of gsheets for documenting QA results. As we begin rolling out our internal testing tools, we're looking for tools in the community that we could contribute some functionality to. Our contribution would be the gsheet scripts we use to munge the incoming data as well as the code we use to send the data to the sheets (integrated into your framework). I look forward to hearing your thoughts.

All the best,
Adam

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.