Support from Acquia helps fund testing for Drupal Acquia logo

Comments

LewisNyman’s picture

DamienMcKenna’s picture

Shouldn't there also be a tag for "meta tags"?

rteijeiro’s picture

Status: Active » Needs review
FileSize
1.39 KB

I copied the same solution from the template_preprocess_html in the core/includes/theme.inc file and it seems to work.

Let me know what do you think :)

LewisNyman’s picture

Status: Needs review » Needs work

Can we make this code a little bit less repetitive? Maybe have a meta tags function we call to add them in? I did that in #1337554: Develop and use separate branding for the installer but we should add it here really

rteijeiro’s picture

Assigned: Unassigned » rteijeiro

Absolutely, I will do it today when I have some time. Thanks!!

LewisNyman’s picture

Status: Needs work » Needs review
FileSize
1.54 KB

I've added the mobile meta tags function from #1337554: Develop and use separate branding for the installer

Status: Needs review » Needs work

The last submitted patch, mobile-friendly-meta-tags-maintenance-1887800-6.patch, failed testing.

rteijeiro’s picture

Status: Needs work » Needs review

I completely forgot about this issue. Tested and the patch applies well so let see what says the Testbot again and RTBC ;)

rteijeiro’s picture

rteijeiro’s picture

Status: Needs review » Reviewed & tested by the community

It seems RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

Now that we can test the interactive installer we should add a test to check that these tags are added.

You should be able to assert that the headers are there in the setUp method of \Drupal\system\Tests\InstallerTest

rteijeiro’s picture

Status: Needs work » Needs review
FileSize
2.69 KB

Test created but not sure if it's correct. Feel free to blame on me :)

Status: Needs review » Needs work

The last submitted patch, mobile-friendly-meta-tags-maintenance-1887800-12.patch, failed testing.

rteijeiro’s picture

Another try copied from: DefaultMobileMetaTagsTestCase test in core/modules/system/system.test file.

I don't know why it gives me an error when I add a new test case in the InstallerTest.php. I there is only one test case, it works correctly. Maybe other people can help me with this issue because I don't have enough experience with PHP Unit testing :(

rteijeiro’s picture

Ok, now #6 patch and the test.

LewisNyman’s picture

Assigned: rteijeiro » Unassigned
Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, mobile-friendly-meta-tags-maintenance-1887800-15.patch, failed testing.

JohnAlbin’s picture

Category: task » bug

The patch in #6 doesn't work. That might explain why the tests fail in #15.

Lewis, you are calling a "_theme_mobile_meta_tags" function twice, but never define it.

Also, this issue is a bug, not a task. The CSS is designed to work on small screens, but the lack of metatags means that mobile devices will fake a much larger desktop-sized viewport.

JohnAlbin’s picture

Assigned: Unassigned » JohnAlbin

I was going to live demo the installer in an iPhone tomorrow, but can't until I fix this bug.

@Lewis, Oh! I take it back. I see how that function is defined. Sneaky little patch. :-)

I'm going to try to get this patch to green.

JohnAlbin’s picture

Component: Seven theme » install system
Status: Needs work » Needs review
Issue tags: -Needs tests
FileSize
5.81 KB

I don't like the _theme_mobile_meta_tags() function name. I've renamed it to drupal_add_mobile_meta_tags(), which… sucks less.

And here's a test that actually works. It was tricky to write. Copied chunks from both DefaultMobileMetaTagsTest and from InstallerTranslationTest.

JohnAlbin’s picture

Here's a new patch that refactors a lot of the underlying plumbing. It makes the meta tag test much smaller. But I'm fairly certain it causes several warnings, but maybe no failures. Needs work, but let's let the testbot have a go.

Status: Needs review » Needs work

The last submitted patch, 1887800-21-installer-tests.patch, failed testing.

LewisNyman’s picture

LewisNyman’s picture

If we are going to refactor this code it might also be worth thinking about the @viewport CSS rule, it triggers the same behaviour.

LewisNyman’s picture

Status: Needs work » Needs review
Issue tags: -mobile, -d8mux

#21: 1887800-21-installer-tests.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +mobile, +d8mux

The last submitted patch, 1887800-21-installer-tests.patch, failed testing.

JohnAlbin’s picture

Re-rolled patch for MWDS show-and-tell. Should still fail.

JohnAlbin’s picture

I'm going to move the installer test refactoring to a new issue, make this issue a dependency on this one. Also, I'll need to take a look at Lewis' latest suggestion.

JohnAlbin’s picture

The refactoring of the installer tests has moved to: #2067919: Refactor installer tests so they don't have to override Setup().

Here's the rerolled patch with the simple tests that require that other issue.

LewisNyman’s picture

Issue summary: View changes
Issue tags: +frontend
jenlampton’s picture

Status: Needs work » Closed (won't fix)

I think this isn't necessary anymore, so marking as closed. Please re-open if I'm wrong.