2018-01-16 11:34:37 +01:00
|
|
|
import flectra.tests
|
2018-01-16 06:58:15 +01:00
|
|
|
|
|
|
|
|
2018-01-16 11:34:37 +01:00
|
|
|
class TestUi(flectra.tests.HttpCase):
|
2018-01-16 06:58:15 +01:00
|
|
|
|
|
|
|
post_install = True
|
|
|
|
at_install = False
|
|
|
|
|
|
|
|
def test_admin(self):
|
|
|
|
# Seen that:
|
|
|
|
# - this test relies on demo data that are entirely in USD (pricelists)
|
|
|
|
# - that main demo company is gelocated in US
|
|
|
|
# - that this test awaits for hardcoded USDs amount
|
|
|
|
# we have to force company currency as USDs only for this test
|
2018-07-13 11:51:12 +02:00
|
|
|
self.cr.execute("UPDATE res_company SET currency_id = %s WHERE id = %s", [self.env.ref('base.USD').id, self.env.ref('base.main_company').id])
|
2018-01-16 11:34:37 +01:00
|
|
|
self.phantom_js("/", "flectra.__DEBUG__.services['web_tour.tour'].run('event_buy_tickets')", "flectra.__DEBUG__.services['web_tour.tour'].tours.event_buy_tickets.ready", login="admin")
|
2018-01-16 06:58:15 +01:00
|
|
|
|
|
|
|
def test_demo(self):
|
2018-01-16 11:34:37 +01:00
|
|
|
self.phantom_js("/", "flectra.__DEBUG__.services['web_tour.tour'].run('event_buy_tickets')", "flectra.__DEBUG__.services['web_tour.tour'].tours.event_buy_tickets.ready", login="demo")
|
2018-01-16 06:58:15 +01:00
|
|
|
|
|
|
|
# TO DO - add public test with new address when convert to web.tour format.
|