diff --git a/core/src/zeit/content/volume/browser/tests/test_form.py b/core/src/zeit/content/volume/browser/tests/test_form.py index c57e7cf447..f39808f1b2 100644 --- a/core/src/zeit/content/volume/browser/tests/test_form.py +++ b/core/src/zeit/content/volume/browser/tests/test_form.py @@ -147,3 +147,24 @@ def test_only_one_cover_add_form_is_visible_at_the_time(self): s.select('id=choose-cover', 'label=Zeit Magazin') s.assertVisible('css=.fieldname-cover_ZMLB_portrait') s.assertNotVisible('css=.fieldname-cover_ZEI_portrait') + + def test_saves_title_for_each_cover(self): + s = self.selenium + volume = self.repository['2015']['01']['ausgabe'] + title_overrides = volume.xml.makeelement('title-overrides') + text_zei = volume.xml.makeelement('title', {'product_id': 'ZEI'}) + text_zei.text = 'Budgies are cool' + text_zmlb = volume.xml.makeelement('title', {'product_id': 'ZMLB'}) + text_zmlb.text = 'Kingfishers are eating fish' + title_overrides.append(text_zei) + title_overrides.append(text_zmlb) + volume.xml.append(title_overrides) + self.repository['2015']['01']['ausgabe'] = volume + self.open('/repository/2015/01/ausgabe/@@checkout') + s.waitForElementPresent('css=#choose-cover') + # Set title of Die Zeit + s.select('id=choose-cover', 'label=Die Zeit') + s.assertValue('id=form.title_ZEI', 'Budgies are cool') + # Set title for Zeit Magazin + s.select('id=choose-cover', 'label=Zeit Magazin') + s.assertValue('id=form.title_ZMLB', 'Kingfishers are eating fish')