-
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/category-filter, core/expanding-search): adjust clear button (…
…#303) Co-authored-by: Lukas Maurer <lukas.maurer@siemens.com>
- Loading branch information
1 parent
ea0381e
commit 87574a6
Showing
10 changed files
with
119 additions
and
22 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
62 changes: 62 additions & 0 deletions
62
packages/core/src/components/category-filter/test/basic/index.html
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,62 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2022 Siemens AG | ||
SPDX-License-Identifier: MIT | ||
--> | ||
|
||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" | ||
/> | ||
<title>Stencil Component Starter</title> | ||
<style> | ||
body { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
form { | ||
margin: 0; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<ix-category-filter placeholder="Filter by"></ix-category-filter> | ||
<script type="module"> | ||
(async () => { | ||
await window.customElements.whenDefined('ix-category-filter'); | ||
|
||
const repeatCategories = false; | ||
const filterState = { | ||
tokens: ['Custom filter text'], | ||
categories: [ | ||
{ | ||
id: 'ID_1', | ||
value: 'IBM', | ||
operator: 'Not equal', | ||
}, | ||
], | ||
}; | ||
const categories = { | ||
ID_1: { | ||
label: 'Vendor', | ||
options: ['Apple', 'MS', 'Siemens'], | ||
}, | ||
ID_2: { | ||
label: 'Product', | ||
options: ['iPhone X', 'Windows', 'APS'], | ||
}, | ||
}; | ||
|
||
const categoryFilter = document.querySelector('ix-category-filter'); | ||
categoryFilter.repeatCategories = repeatCategories; | ||
categoryFilter.filterState = filterState; | ||
categoryFilter.categories = categories; | ||
})(); | ||
</script> | ||
<script src="http://127.0.0.1:8080/scripts/e2e/load-e2e-runtime.js"></script> | ||
</body> | ||
</html> |
18 changes: 18 additions & 0 deletions
18
packages/core/src/components/category-filter/test/category-filter.e2e.ts
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,18 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2022 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 { regressionTest } from '@utils/test'; | ||
|
||
regressionTest.describe('category-filter', () => { | ||
regressionTest('should not have visual regressions', async ({ page }) => { | ||
await page.goto('category-filter/test/basic'); | ||
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(); | ||
}); | ||
}); |
Binary file added
BIN
+12.3 KB
...er-should-not-have-visual-regressions-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
+12.1 KB
...r-should-not-have-visual-regressions-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.
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