summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2014-03-16 15:45:46 +0100
committerAntony Lesuisse <al@openerp.com>2014-03-16 15:45:46 +0100
commit0772c99bcbca4b4ddac66cc81ab4781e397b87d8 (patch)
tree3ddadb43046cde24146e3b8daa652661759fc517
parente23ce631332f166003ee51b65b36b051026411e4 (diff)
[FIX] website test, remove useless test, waitfor banner fix
bzr revid: al@openerp.com-20140316144546-agpgmlwxa532xxmb
-rw-r--r--addons/website/static/src/js/website.tour.test.admin.js106
-rw-r--r--addons/website/tests/test_ui.py2
2 files changed, 1 insertions, 107 deletions
diff --git a/addons/website/static/src/js/website.tour.test.admin.js b/addons/website/static/src/js/website.tour.test.admin.js
deleted file mode 100644
index 01f4448abb2..00000000000
--- a/addons/website/static/src/js/website.tour.test.admin.js
+++ /dev/null
@@ -1,106 +0,0 @@
-(function () {
- 'use strict';
-
- var website = openerp.website;
-
- website.Tour.LoginEdit = website.Tour.extend({
- id: 'login_edit',
- name: "Try to log as admin and check editor",
- path: '/',
- init: function () {
- var self = this;
- self.steps = [
- {
- title: "click login",
- element: '#top_menu a[href*="/web/login"]',
- },
- {
- title: "insert login",
- element: '.oe_login_form input[name="login"]',
- sampleText: "admin",
- },
- {
- title: "insert password",
- waitFor: '.oe_login_form input[name="login"][value!=""]',
- element: '.oe_login_form input[name="password"]',
- sampleText: "admin",
- },
- {
- title: "select 2 Standard tickets",
- waitFor: '.oe_login_form input[name="password"][value!=""]',
- element: '.oe_login_form button',
- },
- {
- title: "go back to website from backend",
- element: 'a[data-action-model="ir.actions.act_url"]:contains("Website")',
- },
- {
- title: 'try to edit',
- waitNot: '#wrap .carousel',
- element: 'button[data-action=edit]:visible',
- },
- {
- title: 'check edit mode',
- waitFor: 'button[data-action=save]:visible',
- },
- {
- title: 'check branding',
- waitFor: '#wrap[data-oe-model="ir.ui.view"]',
- },
- {
- title: 'check rte',
- waitFor: '#oe_rte_toolbar',
- },
- {
- title: 'check insert block button',
- element: '[data-action="snippet"]:visible',
- },
- {
- title: 'add snippets',
- snippet: '#snippet_structure .oe_snippet:first',
- },
- {
- title: 'try to save',
- waitFor: '.oe_overlay_options .oe_options:visible',
- element: 'button[data-action=save]:visible',
- },
- {
- title: 'check saved',
- waitFor: '#wrap div.carousel',
- element: 'button[data-action=edit]:visible',
- },
- {
- title: 'try to re-edit',
- waitFor: 'button[data-action=save]:visible',
- element: '#wrap .carousel',
- },
- {
- title: 'remove snippet',
- element: '.oe_snippet_remove',
- },
- {
- title: 'try to re-save',
- waitNot: '#wrap .carousel',
- element: 'button[data-action=save]:visible',
- },
- {
- title: "click admin",
- waitFor: 'button[data-action=edit]:visible',
- element: 'a:contains("Administrator")',
- },
- {
- title: "click logout",
- element: '#top_menu a[href*="/logout"]',
- },
- {
- title: "check logout",
- waitFor: '#top_menu a[href*="/web/login"]',
- },
- ];
- return this._super();
- },
- });
- // for test without editor bar
- website.Tour.add(website.Tour.LoginEdit);
-
-}());
diff --git a/addons/website/tests/test_ui.py b/addons/website/tests/test_ui.py
index c9dd80ff885..54cd8a73a67 100644
--- a/addons/website/tests/test_ui.py
+++ b/addons/website/tests/test_ui.py
@@ -8,6 +8,6 @@ class TestUi(openerp.tests.HttpCase):
self.phantom_js("/", "console.log('ok')", "openerp.website.editor", login='admin')
def test_04_admin_tour_banner(self):
- self.phantom_js("/", "openerp.website.Tour.run_test('banner')", "openerp.website.Tour", login='admin')
+ self.phantom_js("/", "openerp.website.Tour.run_test('banner')", "openerp.website.Tour.tours.banner", login='admin')
# vim:et: