[IMP] website_hr_recruitment: Adapt tests to work with/without demo data

This commit is contained in:
Yannick Tivisse
2019-11-05 16:18:10 +01:00
parent 813cd0b50b
commit 5faabd487c
2 changed files with 12 additions and 1 deletions
@@ -5,8 +5,14 @@ odoo.define('website_hr_recruitment.tour', function(require) {
tour.register('website_hr_recruitment_tour', {
test: true,
url: '/jobs/apply/3',
url: '/jobs',
}, [{
content: "Select Job",
trigger: ".oe_website_jobs h3 span:contains('A Test Job')"
}, {
content: "Apply",
trigger: ".js_hr_recruitment a:contains('Apply')"
}, {
content: "Complete name",
trigger: "input[name=partner_name]",
run: "text John Smith"
@@ -7,6 +7,11 @@ import odoo.tests
@odoo.tests.tagged('post_install', '-at_install')
class TestWebsiteHrRecruitmentForm(odoo.tests.HttpCase):
def test_tour(self):
job = self.env['hr.job'].create({
'name': 'A Test Job',
'is_published': True,
})
self.start_tour("/", 'website_hr_recruitment_tour')
# check result