-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Enhances the usage of converter
- Loading branch information
1 parent
6a5440a
commit 98b36f6
Showing
5 changed files
with
46 additions
and
19 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
11 changes: 11 additions & 0 deletions
11
src/converter/test/mock-test-utils/dom/test-component-b/child-wrapper.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,11 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
import { ComponentWrapper, createWrapper } from '@cloudscape-design/test-utils-core/dom'; | ||
|
||
export class ChildWrapper extends ComponentWrapper { | ||
static rootSelector = 'test-component-b-child'; | ||
|
||
findContent() { | ||
return createWrapper().find('.test-component-b-child-content'); | ||
} | ||
} |
5 changes: 3 additions & 2 deletions
5
src/converter/test/mock-test-utils/dom/test-component-b/index.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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
import { ComponentWrapper, createWrapper } from '@cloudscape-design/test-utils-core/dom'; | ||
import { ChildWrapper } from './child-wrapper'; | ||
|
||
export default class TestComponentBWrapper extends ComponentWrapper { | ||
static rootSelector = 'test-component-b-root'; | ||
|
||
findChild() { | ||
return createWrapper().find('.test-component-b-child'); | ||
findChild(): ChildWrapper { | ||
return createWrapper().find(`.${ChildWrapper.rootSelector}`); | ||
} | ||
} |