[MIG] web_pwa_oca: Migration to 14.0

This commit is contained in:
Olga Marco
2022-01-07 11:07:30 +01:00
committed by sergio-teruel
parent 0d12fa42d6
commit 3ae595d0d9
3 changed files with 12 additions and 9 deletions

View File

@@ -6,7 +6,7 @@
{ {
"name": "Progressive web application", "name": "Progressive web application",
"summary": "Make Odoo a PWA", "summary": "Make Odoo a PWA",
"version": "13.0.1.0.2", "version": "14.0.1.0.0",
"development_status": "Beta", "development_status": "Beta",
"category": "Website", "category": "Website",
"website": "https://github.com/OCA/web", "website": "https://github.com/OCA/web",

View File

@@ -37,14 +37,14 @@ class TestUi(odoo.tests.HttpCase):
manifest_content_str = manifest_data.content.decode("utf-8") manifest_content_str = manifest_data.content.decode("utf-8")
manifest_content = json.loads(manifest_content_str) manifest_content = json.loads(manifest_content_str)
self.assertEquals(manifest_content["name"], "Test PWA") self.assertEqual(manifest_content["name"], "Test PWA")
self.assertEquals(manifest_content["short_name"], "Test") self.assertEqual(manifest_content["short_name"], "Test")
# icon should remain the default one # icon should remain the default one
self.assertEquals( self.assertEqual(
manifest_content["icons"][0]["src"], manifest_content["icons"][0]["src"],
"/web_pwa_oca/static/img/icons/icon-128x128.png", "/web_pwa_oca/static/img/icons/icon-128x128.png",
) )
self.assertEquals(manifest_content["icons"][0]["sizes"], "128x128") self.assertEqual(manifest_content["icons"][0]["sizes"], "128x128")
self.assertTrue(manifest_content["icons"][0]["type"].startswith("image/png")) self.assertTrue(manifest_content["icons"][0]["type"].startswith("image/png"))
def test_manifest_logo_upload(self): def test_manifest_logo_upload(self):
@@ -62,9 +62,9 @@ class TestUi(odoo.tests.HttpCase):
manifest_content_str = manifest_data.content.decode("utf-8") manifest_content_str = manifest_data.content.decode("utf-8")
manifest_content = json.loads(manifest_content_str) manifest_content = json.loads(manifest_content_str)
self.assertEquals(manifest_content["icons"][0]["src"], "/web_pwa_oca/icon.svg") self.assertEqual(manifest_content["icons"][0]["src"], "/web_pwa_oca/icon.svg")
self.assertTrue(manifest_content["icons"][0]["type"].startswith("image/svg")) self.assertTrue(manifest_content["icons"][0]["type"].startswith("image/svg"))
self.assertEquals( self.assertEqual(
manifest_content["icons"][0]["sizes"], manifest_content["icons"][0]["sizes"],
"128x128 144x144 152x152 192x192 256x256 512x512", "128x128 144x144 152x152 192x192 256x256 512x512",
) )
@@ -72,7 +72,7 @@ class TestUi(odoo.tests.HttpCase):
# Get the icon and compare it # Get the icon and compare it
icon_data = self.url_open("/web_pwa_oca/icon.svg") icon_data = self.url_open("/web_pwa_oca/icon.svg")
icon_data_bytes = base64.b64encode(icon_data.content) icon_data_bytes = base64.b64encode(icon_data.content)
self.assertEquals(icon_data_bytes, icon_to_send) self.assertEqual(icon_data_bytes, icon_to_send)
def test_png_logo_upload(self): def test_png_logo_upload(self):
with open( with open(

View File

@@ -12,7 +12,10 @@
<div class="col-12 col-lg-6 o_setting_box" id="domain_setting"> <div class="col-12 col-lg-6 o_setting_box" id="domain_setting">
<div class="o_setting_right_pane"> <div class="o_setting_right_pane">
<label for="pwa_name" string="PWA Title" /> <label for="pwa_name" string="PWA Title" />
<span class="fa fa-lg fa-globe" /> <span
class="fa fa-lg fa-globe"
title="Icon next to name"
/>
<div class="text-muted"> <div class="text-muted">
Name and icon of your PWA Name and icon of your PWA
</div> </div>