[unmaintained] DalekJS Base framework

Related tags

Testing dalek
Overview

No Maintenance Intended

DalekJS is not maintained any longer 😢

We recommend TestCafé for your automated browser testing needs.


dalekjs

DalekJS base framework

Build Status Build Status Dependency Status devDependency Status NPM version Coverage unstable Stories in Ready Bitdeli Badge Built with Grunt

NPM NPM

Resources

API Docs - Trello - Code coverage - Code complexity - Contributing - User Docs - Homepage - Twitter

Docs

Daleks documentation can be found here

Help Is Just A Click Away

#dalekjs on FreeNode.net IRC

Join the #daleksjs channel on FreeNode.net to ask questions and get help.

Google Group Mailing List

Get announcements for new releases, share your projects and ideas that are using DalekJS, and join in open-ended discussion that does not fit in to the Github issues list or StackOverflow Q&A.

For help with syntax, specific questions on how to implement a feature using DalekJS, and other Q&A items, use StackOverflow.

StackOverflow

Ask questions about using DalekJS in specific scenarios, with specific features. For example, help with syntax, understanding how a feature works and how to override that feature, browser specific problems and so on.

Questions on StackOverflow often turn in to blog posts or issues.

Github Issues

Report issues with DalekJS, submit pull requests to fix problems, or to create summarized and documented feature requests (preferably with pull requests that implement the feature).

Please don't ask questions or seek help in the issues list. There are other, better channels for seeking assistance, like StackOverflow and the Google Groups mailing list.

DalekJS

Legal FooBar (MIT License)

Copyright (c) 2013 Sebastian Golasch

Distributed under MIT license

Comments
  • Added low level API to use node promises and functions

    Added low level API to use node promises and functions

    • Allow tests to use first/then to reuse javascript test code
    • Adds node/promise to call regular node code

    The first one enables one to write more reusable tests like this:

    var Frontend = require('../lib/frontend').Frontend;
    
    module.exports = {
        'customer can login and logout' : function(test){
            test.first(Frontend.login)
                .then(Frontend.logout)
                .done();
        },
        'has a customer profile': function(test){
            test.first(Frontend.login)
                .then(Frontend.verifyCustomerProfile)
                .then(Frontend.logout)
                .done();
        }
    };
    

    where the frontend library contains code that looks like this:

    module.exports = {
        Frontend: {
            login: function() {
                return this.open('http://localhost:3000/login')
                           .type('#login-email', 'user')
                           .type('#login-password', 'secret')
                           .click('#login-submit')
                           .waitForElement('#logoutNavLink')
                           .assert.visible('#logoutNavLink')
                           .assert.attr('#logoutNavLink img', 'alt', 'Logout');
            },
            logout: function() {
                // ...
            },
            verifyCustomerProfile: function() {
                // ...
            }
        }
    };
    

    The second allows the test to execute node code like this:

    var db = require('db');
    
    module.exports = {
        'customer can login and logout' : function(test){
            test.node(function(done) {
                   db.createTestUser(done);
                 })
                .first(Frontend.login)
                .then(Frontend.logout)
                .done();
        },
        'has a customer profile': function(test){
            test.node(function(done) {
                   db.createTestUser(done);
                 })
                .first(Frontend.login)
                .then(Frontend.verifyCustomerProfile)
                .then(Frontend.logout)
                .done();
        }
    };
    
    opened by threez 17
  • "WARNING: done not called!" masking real errors

    I'm not getting error messages / stack traces of problems my tests may have. Instead I'm presented with the utterly useless (and easy to miss) message "WARNING: done not called!".

    I need to see what I did wrong here. Tests need to halt. This is a JavaScript error. I tried to invoke a function that doesn't exist. My test is flawed - stop and yell!

    {
      foo: function(test) {
        test
          // Note that this should be .assert.doesntExist()
          .doesntExist('.selector')
          // this isn't called
          .done();
      }
    }
    
    bug skaro-done 
    opened by rodneyrehm 16
  • Screenshot of element and checking diffence between images

    Screenshot of element and checking diffence between images

    I've added additional selector parameter to screenshot method, that allow to make screenshot only selected element. Also when is making css refactoring we need to check that we have not modified page appearence. So I've added additional assert method that compare screenshot with some stored etalon png image. My changes contain modification in two modules:

    1. dalek.
    • Modified screenshot action to support selector of the element
        test.open('http://google.com')
           .wait(500)
           .screenshot('test/screenshots/google.png','#lga')
           .done();
    
    • Added screenshotIsEqualTo action that allow to check if previously created screenshot is equal to stored image, and create image diff if it necessary.
        test.open('http://google.com')
           .wait(500)
           .screenshot('test/screenshots/google.png','#lga')
           .assert.screenshotIsEqualTo('test/screenshots/google_etalon.png', true, 'Google Doodles')
           .done();
    
    1. dalek-driver-native. fork of dalek-driver-native Added Image lib that support necessary for changes in dalek operations. Image lib relies on node-pngjs lib, that is simple pure js lib for work with png files.

    I was inspired by @stoyanstefanov post (http://www.phpied.com/css-diffs-2/)

    I'm quite new in github and open source contribution, so please let me know if I'm doing something in wrong way.

    opened by gskachkov 12
  • `Running tests` and nothing else

    `Running tests` and nothing else

    Hi, I'm trying to make a Dockerfile to run Dalek:

    FROM ubuntu:14.04
    MAINTAINER Lorenzo Mele <[email protected]>
    
    # update packages before install
    RUN apt-get update
    
    # install nodejs
    RUN apt-get install nodejs npm -y
    RUN ln `which nodejs` /usr/bin/node
    
    # install Dalekjs
    RUN npm install dalek-cli -g
    # install the Dalek base framework & all its dependencies
    RUN npm install dalekjs --save-dev
    

    Then I built the image: sudo docker build -t "local/dalek" . Finally I entered in the VM: sudo docker run -i -t "local/dalek" /bin/bash

    I created the file test/my_first_test.js as described here, then I launch the test and this is what appens:

    root@a4a525e451da:/mnt/cwd# dalek test/my_first_test.js  -l 5
    Running tests
    ☁ [SYSTEM] dalek-internal-driver: Loading driver: "native"
    root@a4a525e451da:/mnt/cwd# 
    

    What am I missing to make the test work?

    bug 
    opened by greenkey 11
  • Feature request: Support for Setup and Teardown functions

    Feature request: Support for Setup and Teardown functions

    This might not be an easy one, but I'll ask anyway :smile:

    The scenario could be like this:

    Imagine a site, where we have to test a lot of different things after for example having logged on first.

    So, I imagine it would be better if we could somehow have a reusable setup function in which we first setup our complete login (with an assertion that it was successful, otherwise the whole test or tests should fail). After the actual test, the reusable teardown function would then log the user out.

    The setup and teardown functionality would probably itself be based on the testing functionality with a few extensions...

    What do you think?

    enhancement skaro-done 
    opened by frankmayer 10
  • log.message() doesn't work

    log.message() doesn't work

    (at least on Windows anyhow)

    Whenever I try to use log.message(), in any form, the test either stalls when it reaches that instruction, or the test "ends" immediately displaying the current number of assertions, but without exiting the process (I need to Ctrl+Break to exit it), or it's simply skipped without outputting any messages at all.

    I haven't been able to get any of the log features working at all (message() and dom()).

    bug skaro-ignore 
    opened by justrhysism 8
  • Unable to run tests.

    Unable to run tests.

    Having an issue with the current stable version of DalekJS. I just did a clean install and tried to the run the quickstart 'Write your first test' test; But Dalek just exits after saying "Running tests"

    I just tried to use the current Canary build

    DalekJS CLI Tools Version: 0.0.2 DalekJS Canary local install: 0.0.1-2013-08-21-14-28-59

    And got the following error: -

    /projecta/core/node_modules/dalekjs-canary/node_modules/dalek-browser-phantomjs-canary/index.js:255

    var browsers = this.config.get('browsers'); ^ TypeError: Cannot call method 'get' of undefined

    opened by William-Owen 8
  • setValue() doesnt work

    setValue() doesnt work

    Hi, I know this is sort of a duplicate of the closed issue #77 , but I still get the error {'0': undefined} when trying to use setValue to clear an input. In #77 it says it has been fixed in canary, I am using v0.0.8 so should I expect this to be fixed in this build?

    Also what version is the .clear method going to be added (mentioned in #111) for just running in phantomJS?

    Thanks in advance

    bug enhancement skaro-todo skaro-plugin 
    opened by burt202 7
  • Problem on Windows

    Problem on Windows

    Hello,

    i started to create tests in Dalek on OSX, and then we tried to test them on Windows as well.

    What happens:

    • Chrome opens
    • Form fields are filled
    [2556:6332:0519/155517:ERROR:ipc_channel_win.cc(405)] pipe error: 232
    [2556:6332:0519/155517:ERROR:ipc_channel_win.cc(405)] pipe error: 232
    [2556:6332:0519/155517:ERROR:ipc_channel_win.cc(405)] pipe error: 232
    
    • intended click is never sent to chrome.

    Same happens for IE, Firefox and PhantomJS

    I would appriciate any hint how to get it working on windows :smile:

    question docs 
    opened by kaystrobach 7
  • feat(suite): bind this to the current test

    feat(suite): bind this to the current test

    Bind this to the current test at execution. Semantic: "this is the current test".

    No need to use a function argument for accessing DSL.

    Example Code:

    module.exports = {
        // Checks if the <title> of ´github.com´ has the expected value
        'Page title is correct': function () {
            'use strict';
            this.expect(1);
    
            this
                .open('http://github.com')
                .assert.title('GitHub')
                .done();
        }
    };
    
    

    Also set test via the arguments array to backward compatibility.

    I've also tried to add a test for this, but there is not so much base-tests to extend ... So I'm not so deep enough into dalek to create the initial test-suite.

    opened by robinboehm 7
  • initial attempt to add right click action

    initial attempt to add right click action

    I am trying to add a right click action to DalekJS. Current commit doesn't perform a right click action.

    I am trying to send a {button = 2} parameter to a WebDriver API according to the W3C documentation

    I tried the following options with no result:

    var rightButton = {'button': '2'};
    var rightButton = 'right';
    var rightButton = '2';
    

    I am guessing that this line doesn't call WebDriver API directly, does it? What shall I do in order to pass {button = 2} parameter further to the WebDriver API?

    P.S. traling spaces are removed as specified in the .editorconfig file.

    opened by jzelenkov 6
  • DalekJS v0.0.5 installation hung on Windows 10

    DalekJS v0.0.5 installation hung on Windows 10

    I am using Windows 10 x64 version 1607 - build 14393.222. DalekJS version: C:\Users\Administrator>dalek -v DalekJS CLI Tools Version: 0.0.5 Brought to you with love by: Sebastian Golasch (@asciidisco) 2013

    NodeJS installation was successful - node-v6.8.0-x64.msi "npm install dalek-cli -g" command was successful "npm install dalekjs --save-dev" - this command was hung for over 8 hours.

    See snapshot attached. dalekjs setup not working

    opened by SumsMystic 3
  • Capturing errors from requests

    Capturing errors from requests

    This question is likely better suited for the IRC channel, but I am having trouble accessing it. From your comments here, and here, it seems like there were plans to support the ability to capture errors from requests triggered by a page that are logged to the console.

    Even when I set the log level to 5 it doesn't seem to show the status of all requests triggered by going to a page, specifically any requests that returns a 500. Is this currently possible with Dalek or do you still have plans to support this in the future?

    Thank you, and love the framework.

    opened by Eddolan 0
  • can i use regular expressions on Dalek?

    can i use regular expressions on Dalek?

    can i use regular expressions in the .type or .setValue method? for example: I have a field that keeps changing its ID -> customfield_{random number}

    if you guys could answer i would be really glad. thx!

    opened by box3x4 1
Releases(0.0.9)
Owner
DalekJS
DalekJS
Simple JavaScript testing framework for browsers and node.js

A JavaScript Testing Framework Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any Ja

Jasmine 15.5k Jan 2, 2023
🔮 An easy-to-use JavaScript unit testing framework.

QUnit - A JavaScript Unit Testing Framework. QUnit is a powerful, easy-to-use, JavaScript unit testing framework. It's used by the jQuery project to t

QUnit 4k Jan 2, 2023
E2E test framework for Angular apps

Protractor Protractor is an end-to-end test framework for Angular and AngularJS applications. Protractor is a Node.js program built on top of WebDrive

Angular 8.8k Jan 2, 2023
Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

?? Playwright Documentation | API reference Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit w

Microsoft 46.3k Jan 9, 2023
solana-base-app is a base level, including most of the common features and wallet connectivity, try using `npx solana-base-app react my-app`

solana-base-app solana-base-app is for Solana beginners to get them up and running fast. To start run : run npx solana-base-app react my-app change th

UjjwalGupta49 33 Dec 27, 2022
UNMAINTAINED Open source JavaScript renderer for Kartograph SVG maps

This project is not maintained anymore. Here are a few reasons why I stopped working on kartograph.js: there's no need to support non-SVG browsers any

null 1.5k Dec 11, 2022
[UNMAINTAINED] Simple feed-forward neural network in JavaScript

This project has reached the end of its development as a simple neural network library. Feel free to browse the code, but please use other JavaScript

Heather 8k Dec 26, 2022
:skull: An ancient tiny JS and CSS loader from the days before everyone had written one. Unmaintained.

LazyLoad Note: LazyLoad is no longer being maintained. I'm not responding to issues or pull requests, since I don't use this project anymore and don't

Ryan Grove 1.4k Jan 3, 2023
This extensions will prompt you to remove any other extensions that we found as being broken and unmaintained.

octarine vscode extension This extensions will prompt you to remove any other extensions that we found as being broken and unmaintained. We do expect

42picky 4 May 27, 2022
Deta Base UI - A place with more functionality for managing your Deta Base(s).

Deta Base UI - A place with more functionality for managing your Deta Base(s). ✨ Features: Total rows count Quick multi select (click and shift) Searc

Harman Sandhu 13 Dec 29, 2022
Desafio [Frontend Mentor] - Projeto feito com o framework React que anuncia vagas de emprego e filtra com base nas categorias selecionadas.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Vinícius 4 May 20, 2022
HTML5 Canvas Gauge. Tiny implementation of highly configurable gauge using pure JavaScript and HTML5 canvas. No dependencies. Suitable for IoT devices because of minimum code base.

HTML Canvas Gauges v2.1 Installation Documentation Add-Ons Special Thanks License This is tiny implementation of highly configurable gauge using pure

Mykhailo Stadnyk 1.5k Dec 30, 2022
A React Component library implementing the Base design language

Base Web React Components Base is a design system comprised of modern, responsive, living components. Base Web is the React implementation of Base. Us

Uber Open Source 8.1k Dec 29, 2022
Eleventy base project

Project base for Eleventy Sites Includes static page template, blog post template, post feed, pagination, tags and RSS. Also includes gulp setup for S

Andy Bell 70 Dec 21, 2022
The code base for the tutorial on how to use the TypingDNA Verify API

TypingDNA-Verify-API-Tutorial The code base for the tutorial on how to use the TypingDNA Verify API Resources TypingDNA Website TypingDNA Verify Docs

Tim Ruscica 21 Oct 6, 2022
Beautiful theme for Obsidian, Base on Minimal theme

?? obsidian_orange 是什么? obsidian_orange 是一款基于 minimal theme 定制的主题。 ✨ obsidian_orange 实现了什么功能? 多样式“提示块” 图片并列显示 高亮块 & 文本多颜色高亮 徽章(Badge):在标题或文本的右上角添加状态信息

echoxu 84 Jan 6, 2023
This is a starter file with base SvelteKit skeleton configurations with Open Props, Jit Props, and PostCSS configured.

create-svelte Everything you need to build a Svelte project, powered by create-svelte; Creating a project If you're seeing this, you've probably alrea

Brittney Postma 4 Jul 22, 2022
Base-mock-api - Repo to storage my fake api's to use in my 2022 projects.

Base Mock API's Project made 100% with JavaScript, with the objective of creating endpoints to use in projects. Prerequisites Before you begin, ensure

Arthur Cabral 0 Nov 20, 2022
The code base that powered India in Pixels' YouTube channel for more than 2 years - now open sourced for you to use on your own projects

India in Pixels Bar Chart Racing For over two years, this nifty code base powered India in Pixels' YouTube channel with videos fetching over millions

India in Pixels 141 Dec 4, 2022
JavaScript API based capstone project using TVmaze API for displaying and interacting with items from the data base.

Yuriy Chamkoriyski & Bonke Gcobo Javascript capstone project API-based webapp from Module 2 at Microverse Wireframe requirements The Home Page low fid

Yuriy Chamkoriyski 5 May 30, 2022