-
Notifications
You must be signed in to change notification settings - Fork 16
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
fix for issue-319 #993
fix for issue-319 #993
Conversation
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. |
test/e2e/layers/layerLabel.test.js
Outdated
await map.evaluate((map) => | ||
map.querySelector('layer-').removeAttribute('hidden') | ||
); | ||
|
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 is not needed, as the layer does not have a "hidden" attribute, I think we copied this over from a previous test.
test/e2e/layers/layerLabel.test.js
Outdated
}); | ||
|
||
test('Name of unnamed layer is Layer', async () => { | ||
const label = await page.locator('body > mapml-viewer > layer-'); |
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.
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.
closes #319