-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core/menu): a-tag styling (#689)
- Loading branch information
1 parent
c49e967
commit 3e3e30b
Showing
7 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 Siemens AG | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import { expect } from '@playwright/test'; | ||
import { test } from '@utils/test'; | ||
|
||
test('should render menu items with a[href]', async ({ mount, page }) => { | ||
await mount(` | ||
<ix-basic-navigation> | ||
<ix-menu> | ||
<a href="#link1"> | ||
<ix-menu-item>Link 1</ix-menu-item> | ||
</a> | ||
<ix-menu-category label="Sub"> | ||
<a href="#link2"> | ||
<ix-menu-item>Link 2</ix-menu-item> | ||
</a> | ||
<a href="#link3"> | ||
<ix-menu-item active>Link 3</ix-menu-item> | ||
</a> | ||
<a href="#link4"> | ||
<ix-menu-item>Link 4</ix-menu-item> | ||
</a> | ||
<a href="#link5"> | ||
<ix-menu-item>Link 5</ix-menu-item> | ||
</a> | ||
</ix-menu-category> | ||
</ix-menu> | ||
</ix-basic-navigation>`); | ||
|
||
const basicNavigationElement = page.locator('ix-basic-navigation'); | ||
|
||
const category = page.locator('ix-menu-category'); | ||
await category.click(); | ||
|
||
const link1 = page.getByText('Link 1', { exact: true }); | ||
await expect(link1).toBeVisible(); | ||
|
||
const link2 = page.getByText('Link 1', { exact: true }); | ||
await expect(link2).toBeVisible(); | ||
|
||
await page.waitForTimeout(1000); | ||
|
||
expect( | ||
await basicNavigationElement.screenshot({ | ||
animations: 'disabled', | ||
}) | ||
).toMatchSnapshot(); | ||
}); |
Binary file added
BIN
+11.2 KB
.../should-render-menu-items-with-a-href-1-chromium---theme-classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.1 KB
...should-render-menu-items-with-a-href-1-chromium---theme-classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.