Skip to content
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

Merged
merged 6 commits into from
Oct 11, 2024
Merged

fix for issue-319 #993

merged 6 commits into from
Oct 11, 2024

Conversation

yushan-mu
Copy link
Contributor

closes #319

@prushforth
Copy link
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.

Comment on lines 21 to 24
await map.evaluate((map) =>
map.querySelector('layer-').removeAttribute('hidden')
);

Copy link
Member

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('Name of unnamed layer is Layer', async () => {
const label = await page.locator('body > mapml-viewer > layer-');
Copy link
Member

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.

@prushforth prushforth merged commit 9a5a03c into Maps4HTML:main Oct 11, 2024
1 check passed
@yushan-mu yushan-mu deleted the issue-319 branch November 6, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should untitled layers be exposed in the layer list UI?
3 participants