Skip to content

Commit

Permalink
fix(core/workflow-step): added test
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiashader committed Jan 8, 2024
1 parent 68c59a2 commit 3b985c9
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
35 changes: 35 additions & 0 deletions packages/core/src/tests/workflow-steps/toggle/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!--
SPDX-FileCopyrightText: 2023 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>
.example {
display: flex;
margin-top: 2rem;
}
ix-workflow-steps {
margin-inline-end: 2rem;
}
</style>
</head>
<body>
<div class="example" \>
<ix-workflow-steps>
<ix-workflow-step status="open">Step 1</ix-workflow-step>
<ix-workflow-step status="open">Step 2</ix-workflow-step>
<ix-workflow-step status="open">Step 3</ix-workflow-step>
</ix-workflow-steps>
</div>
<script src="http://127.0.0.1:8080/scripts/e2e/load-e2e-runtime.js"></script>
</body>
</html>
12 changes: 12 additions & 0 deletions packages/core/src/tests/workflow-steps/workflow-steps.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,16 @@ regressionTest.describe('workflow-steps', () => {

expect(await page.screenshot({ fullPage: true })).toMatchSnapshot();
});

regressionTest('toggle and disable', async ({ page }) => {
await page.goto('workflow-steps/toggle');

const stepItemLocator = page.locator('ix-workflow-step').nth(1);
await stepItemLocator.evaluate((stepItem: any) => {
stepItem.status = 'done';
stepItem.disabled = true;
});

expect(await page.screenshot({ fullPage: true })).toMatchSnapshot();
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3b985c9

Please sign in to comment.