1 /* global casper:false */
3 var lib = require('../lib');
6 lib.changeWorkingDirectory('coding-rules-page-no-available-profiles-for-activation');
9 casper.test.begin('coding-rules-page-no-available-profiles-for-activation', 2, function (test) {
11 .start(lib.buildUrl('coding-rules'), function () {
12 lib.setDefaultViewport();
14 lib.mockRequest('/api/l10n/index', '{}');
15 lib.mockRequestFromFile('/api/rules/app', 'app.json');
16 lib.mockRequestFromFile('/api/rules/search', 'search.json');
17 lib.mockRequestFromFile('/api/rules/show', 'show.json');
18 lib.mockRequest('/api/issues/search', '{}');
22 casper.waitForSelector('.coding-rule.selected', function () {
23 casper.click('.coding-rule.selected .js-rule');
28 casper.waitForSelector('.coding-rules-detail-header');
32 test.assertExist('#coding-rules-quality-profile-activate');
33 casper.click('#coding-rules-quality-profile-activate');
34 casper.waitForSelector('.modal');
38 test.assertExists('.modal .message-notice');