From 98374423b9131137672643ceb969a75777322b16 Mon Sep 17 00:00:00 2001 From: Philipp Melab Date: Fri, 25 Oct 2024 15:39:40 +0200 Subject: [PATCH 1/3] test: disambiguate title fields in preview playwright tests --- tests/e2e/specs/drupal/preview-editor-sidebar.spec.ts | 2 +- tests/e2e/specs/drupal/preview.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/specs/drupal/preview-editor-sidebar.spec.ts b/tests/e2e/specs/drupal/preview-editor-sidebar.spec.ts index c35288741..2bbeeb44e 100644 --- a/tests/e2e/specs/drupal/preview-editor-sidebar.spec.ts +++ b/tests/e2e/specs/drupal/preview-editor-sidebar.spec.ts @@ -7,7 +7,7 @@ test.describe('instant preview - toggle editor sidebar', () => { test('toggle the preview editor sidebar', async ({ page }) => { await page.goto(cmsUrl('/admin/content')); await page.getByRole('link', { name: 'Add content' }).click(); - await page + await (await page.locator('.layout-region--node-main')) .getByLabel('Title', { exact: true }) .fill('Instant preview sidebar test'); await page.locator('#edit-submit').click(); diff --git a/tests/e2e/specs/drupal/preview.spec.ts b/tests/e2e/specs/drupal/preview.spec.ts index 0affafdb2..8d7ae0d39 100644 --- a/tests/e2e/specs/drupal/preview.spec.ts +++ b/tests/e2e/specs/drupal/preview.spec.ts @@ -7,7 +7,7 @@ test.describe('instant preview', () => { test('display an unpublished page in an iframe', async ({ page }) => { await page.goto(cmsUrl('/admin/content')); await page.getByRole('link', { name: 'Add content' }).click(); - await page + await (await page.locator('.layout-region--node-main')) .getByLabel('Title', { exact: true }) .fill('Instant preview test'); await page.locator('#edit-submit').click(); From e1e938253a1bda2e3aa3310fc50f9b02d877bbde Mon Sep 17 00:00:00 2001 From: Philipp Melab Date: Fri, 25 Oct 2024 16:05:34 +0200 Subject: [PATCH 2/3] test: use new browser context for locale header --- tests/e2e/specs/drupal/homepage.spec.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/e2e/specs/drupal/homepage.spec.ts b/tests/e2e/specs/drupal/homepage.spec.ts index 13001c887..fde20b029 100644 --- a/tests/e2e/specs/drupal/homepage.spec.ts +++ b/tests/e2e/specs/drupal/homepage.spec.ts @@ -35,15 +35,17 @@ test.describe('the homepage', () => { ).toBeVisible(); }); - test.describe('if german is the preferred language', () => { - test.use({ locale: 'de-DE' }); - test('redirects to german ', async ({ page }) => { - await page.goto(websiteUrl('/')); - const content = await page.getByRole('main'); - await expect( - content.getByText('Architektur', { exact: true }), - ).toBeVisible(); - }); + test('redirects to german if german is the preferred language', async ({ + browser, + }) => { + const context = await browser.newContext({ locale: 'de-DE' }); + const page = await context.newPage(); + await page.goto(websiteUrl('/')); + const content = await page.getByRole('main'); + await expect( + content.getByText('Architektur', { exact: true }), + ).toBeVisible(); + context.close(); }); test('it displays an image', async ({ page }) => { From dfa8f619b2db1d29148675ac0c70b84f6ddc9c65 Mon Sep 17 00:00:00 2001 From: Vasile Chindris Date: Sun, 27 Oct 2024 08:50:35 +0200 Subject: [PATCH 3/3] chore(SLB-454): style adjustments for the link results suggestions output --- packages/drupal/gutenberg_blocks/css/edit.css | 15 +++++++++++++++ .../gutenberg_blocks/js/blocks/teaser-list.tsx | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/drupal/gutenberg_blocks/css/edit.css b/packages/drupal/gutenberg_blocks/css/edit.css index 68f0871f5..c92ac8034 100644 --- a/packages/drupal/gutenberg_blocks/css/edit.css +++ b/packages/drupal/gutenberg_blocks/css/edit.css @@ -312,3 +312,18 @@ details[open] > summary svg { .col-start-2 { grid-column-start: 2; } + + +/* Reset a few link input suggestion styles to their gutenberg editor values. */ +.block-editor-inner-blocks .block-editor-link-control__search-input-wrapper { + border: 1px solid #cccccc; + font-size: 13px; +} + +.block-editor-inner-blocks .block-editor-link-control__search-input-wrapper button.block-editor-link-control__search-item { + padding: 12px 16px; +} + +.block-editor-inner-blocks .block-editor-link-control__search-input-wrapper button.block-editor-link-control__search-item:hover { + background-color: #ddd; +} diff --git a/packages/drupal/gutenberg_blocks/js/blocks/teaser-list.tsx b/packages/drupal/gutenberg_blocks/js/blocks/teaser-list.tsx index 45421d828..95bd870de 100644 --- a/packages/drupal/gutenberg_blocks/js/blocks/teaser-list.tsx +++ b/packages/drupal/gutenberg_blocks/js/blocks/teaser-list.tsx @@ -47,7 +47,7 @@ registerBlockType<{ attributes; return ( -
+
{__('Teaser list')}