Conversation
Member
|
It would be good to add a test, possibly to an existing .test.js file that fails before this change and passes after the change. |
AliyanH
reviewed
Oct 7, 2024
test/e2e/layers/layerLabel.test.js
Outdated
Comment on lines
21
to
24
| await map.evaluate((map) => | ||
| map.querySelector('layer-').removeAttribute('hidden') | ||
| ); | ||
|
|
Member
There was a problem hiding this comment.
This is not needed, as the layer does not have a "hidden" attribute, I think we copied this over from a previous test.
prushforth
reviewed
Oct 8, 2024
test/e2e/layers/layerLabel.test.js
Outdated
| }); | ||
|
|
||
| test('Name of unnamed layer is Layer', async () => { | ||
| const label = await page.locator('body > mapml-viewer > layer-'); |
Member
There was a problem hiding this comment.
In terms of meaningful variables, label is actually the layer. I think you could do page.locator(...).evaluate() to return the actual label string. Of course you would have to do that after the waitForTimeout, because locators work fast but evaluates actually access the attribute in the page. Since you had already done the await, you could do the expect without the await inside.
added 2 commits
October 8, 2024 11:09
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes #319