django-casper icon indicating copy to clipboard operation
django-casper copied to clipboard

Testing modal visible

Open martync opened this issue 10 years ago • 0 comments

Hi,

I'm trying to check if my modal is visible or not (using bootstrap 2). All I got is a black window with django-casper. I have no problem using directly casperjs command.

Any idea ?

Thanks. Martyn

casper.test.comment('Testing form');

var helper = require('../../../../misc/tests/djangocasper.js');
var root_server = "";


helper.scenario(root_server + "/object/add/", function(){

    this.test.assertNotVisible(
        "#add_field_window",
        "The modal window is not visible"
    );

    this.click("#id_add_custom_field");

    this.wait(10000, function() {
        this.capture("Modal-where-are-you.png", {top: 0, left: 0, width: 900, height: 900})
        this.test.assertVisible(
            '#add_field_window',
            "The modal window is visible"
        );

    });

});

martync avatar Jun 10 '14 14:06 martync