-
Notifications
You must be signed in to change notification settings - Fork 3.3k
misc: Assertion dropdown UI update #31598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d80d7c1
Refactor existing mounter of assertions - make a CT test for it
jennifer-shehane 9e8b218
update more styles + add a11y features
jennifer-shehane 8d3bde6
bump vue-icons
jennifer-shehane 12a851b
Finish last styles and icons
jennifer-shehane baad8ff
Fix logic
jennifer-shehane 4b126bd
bump shared package icons
jennifer-shehane b6a129a
fix test
jennifer-shehane c72adcc
update css to be scoped + set all css to initial to clear AUT styles
jennifer-shehane 420690b
add test for getOrCreateHelperDom function
jennifer-shehane a78f32d
update tabbing test
jennifer-shehane 80f1337
add changelog
jennifer-shehane 11a42a2
update changelog to include addressed in
jennifer-shehane ee3bd02
Merge branch 'develop' into assertion-dropdown-ui-update
jennifer-shehane 7deda81
Merge branch 'develop' into assertion-dropdown-ui-update
jennifer-shehane 48794b7
Merge branch 'develop' into assertion-dropdown-ui-update
jennifer-shehane File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,58 @@ | ||
import { getOrCreateHelperDom } from './dom' | ||
|
||
describe('dom utilities', () => { | ||
describe('getOrCreateHelperDom', () => { | ||
let body: HTMLBodyElement | ||
const className = 'test-helper' | ||
const css = 'test-css' | ||
|
||
beforeEach(() => { | ||
// Create a fresh body element for each test | ||
body = document.createElement('body') | ||
document.body = body | ||
}) | ||
|
||
afterEach(() => { | ||
// Clean up after each test | ||
const containers = body.querySelectorAll(`.${className}`) | ||
|
||
containers.forEach((container) => container.remove()) | ||
}) | ||
|
||
it('should create new helper DOM elements when none exist', () => { | ||
const result = getOrCreateHelperDom({ body, className, css }) | ||
|
||
// Verify container was created | ||
expect(result.container).to.exist | ||
expect(result.container.classList.contains(className)).to.be.true | ||
expect(result.container.style.all).to.equal('initial') | ||
expect(result.container.style.position).to.equal('static') | ||
|
||
// Verify shadow root was created | ||
expect(result.shadowRoot).to.exist | ||
expect(result.shadowRoot!.mode).to.equal('open') | ||
|
||
// Verify vue container was created | ||
expect(result.vueContainer).to.exist | ||
expect(result.vueContainer.classList.contains('vue-container')).to.be.true | ||
|
||
// Verify style was added | ||
const style = result.shadowRoot!.querySelector('style') | ||
|
||
expect(style).to.exist | ||
expect(style!.innerHTML).to.equal(css) | ||
}) | ||
|
||
it('should return existing helper DOM elements when they exist', () => { | ||
// First call to create elements | ||
const firstResult = getOrCreateHelperDom({ body, className, css }) | ||
|
||
// Second call to get existing elements | ||
const secondResult = getOrCreateHelperDom({ body, className, css }) | ||
|
||
// Verify we got the same elements back | ||
expect(secondResult.container).to.equal(firstResult.container) | ||
expect(secondResult.vueContainer).to.equal(firstResult.vueContainer) | ||
}) | ||
}) | ||
}) |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function seemed to be completely untested, so I added a test for this. Many of these runner 'helper' files are untested actually so not a lot of conventions to pull from.