diff options
author | silverwind <me@silverwind.io> | 2024-03-23 00:54:09 +0100 |
---|---|---|
committer | Gusted <postmaster@gusted.xyz> | 2024-03-28 16:43:09 +0100 |
commit | 1ee494a045f496eec71ed200fc1c7368be91dc4d (patch) | |
tree | 5556a825b10befcf10b8fc2f592f6ab02e14ffa7 /tests/e2e | |
parent | [PORT] gitea#29831: Prevent layout shift in `<overflow-menu>` items (diff) | |
download | forgejo-1ee494a045f496eec71ed200fc1c7368be91dc4d.tar.xz forgejo-1ee494a045f496eec71ed200fc1c7368be91dc4d.zip |
[Port] gitea#29982 Introduce `.secondary-nav` and handle `.page-content` spacing universally
Fixes: https://github.com/go-gitea/gitea/issues/29981. Introduce
`.secondary-nav` as a universal way for styling and margin adjustments
inside `.page-content`.
If the first child of `.page-content` is `.secondary-nav`, we add margin
below it, otherwise we add padding to the first child. Notable changes:
- `--color-header-wrapper` is replaced with `--color-secondary-nav-bg`.
- `navbar` class is removed.
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
---
Conflict resolution: Trivial conflict & changed selector to reflect new
classes.
Ref: https://codeberg.org/forgejo/forgejo/issues/2776
(cherry picked from commit 3ccda41a539b8ba7841919ee12dc2877ddc03818)
Diffstat (limited to 'tests/e2e')
-rw-r--r-- | tests/e2e/example.test.e2e.js | 2 | ||||
-rw-r--r-- | tests/e2e/utils_e2e.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/e2e/example.test.e2e.js b/tests/e2e/example.test.e2e.js index c741663a38..57c69a2917 100644 --- a/tests/e2e/example.test.e2e.js +++ b/tests/e2e/example.test.e2e.js @@ -23,7 +23,7 @@ test('Test Register Form', async ({page}, workerInfo) => { await page.click('form button.ui.primary.button:visible'); // Make sure we routed to the home page. Else login failed. await expect(page.url()).toBe(`${workerInfo.project.use.baseURL}/`); - await expect(page.locator('.dashboard-navbar span>img.ui.avatar')).toBeVisible(); + await expect(page.locator('.secondary-nav span>img.ui.avatar')).toBeVisible(); await expect(page.locator('.ui.positive.message.flash-success')).toHaveText('Account was successfully created. Welcome!'); save_visual(page); diff --git a/tests/e2e/utils_e2e.js b/tests/e2e/utils_e2e.js index fba13ab426..d60c78b16e 100644 --- a/tests/e2e/utils_e2e.js +++ b/tests/e2e/utils_e2e.js @@ -52,7 +52,7 @@ export async function save_visual(page) { fullPage: true, timeout: 20000, mask: [ - page.locator('.dashboard-navbar span>img.ui.avatar'), + page.locator('.secondary-nav span>img.ui.avatar'), page.locator('.ui.dropdown.jump.item span>img.ui.avatar'), ], }); |