Skip to content

Commit

Permalink
Clean up test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
prushforth committed Oct 30, 2024
1 parent c2843d2 commit 5d08594
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions test/e2e/core/ArrowKeyNavContextMenu.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ test.describe('Using arrow keys to navigate context menu', () => {
let activeElement = await page.evaluate(
() => document.activeElement.shadowRoot.activeElement.innerHTML
);
expect(activeElement).toEqual('View Fullscreen (<kbd>F</kbd>)');
expect(activeElement).toEqual('View fullscreen (<kbd>F</kbd>)');

await page.keyboard.press('ArrowDown');
await page.keyboard.press('ArrowDown');
Expand Down Expand Up @@ -186,7 +186,7 @@ test.describe('Using arrow keys to navigate context menu', () => {
activeElement = await page.evaluate(
() => document.activeElement.shadowRoot.activeElement.innerHTML
);
expect(activeElement).toEqual('View Fullscreen (<kbd>F</kbd>)');
expect(activeElement).toEqual('View fullscreen (<kbd>F</kbd>)');
});

test('Right and Left Arrow keys to navigate the contextmenu', async () => {
Expand Down Expand Up @@ -301,7 +301,7 @@ test.describe('Using arrow keys to navigate context menu', () => {
activeElement = await page.evaluate(
() => document.activeElement.shadowRoot.activeElement.innerHTML
);
expect(activeElement).toEqual('View Fullscreen (<kbd>F</kbd>)');
expect(activeElement).toEqual('View fullscreen (<kbd>F</kbd>)');

await page.keyboard.press('ArrowDown');

Expand Down
8 changes: 4 additions & 4 deletions test/e2e/core/mapContextMenu.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ test.describe('Playwright Map Context Menu Tests', () => {
);
let name = await nameHandle.jsonValue();
await nameHandle.dispose();
expect(name).toEqual('View Fullscreen (F)');
expect(name).toEqual('View fullscreen (F)');
});

test('Context menu tab goes to next item', async () => {
Expand Down Expand Up @@ -520,10 +520,10 @@ test.describe('Playwright Map Context Menu Tests', () => {
'body > map',
(map) => map.layers[1].label
);
expect(layerLabel).toEqual('Pasted layer');
expect(layerLabel).toEqual('Pasted Layer');
// clean up
await page.$eval('body > map', (map) =>
map.removeChild(map.querySelector('[label="Pasted layer"]'))
map.removeChild(map.querySelector('[label="Pasted Layer"]'))
);
});
test('Submenu, copy location in tilematrix coordinates, which is not implemented, so faked with gcrs', async () => {
Expand Down Expand Up @@ -804,7 +804,7 @@ test.describe('Playwright Map Context Menu Tests', () => {
'div > div.mapml-contextmenu > button:nth-child(4)',
(btn) => btn.textContent
);
expect(fullScreen).toEqual('View Fullscreen (F)');
expect(fullScreen).toEqual('View fullscreen (F)');
let copy = await page.$eval(
'div > div.mapml-contextmenu > button:nth-child(6)',
(btn) => btn.textContent
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/layers/queryLink.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ test.describe('Playwright Query Link Tests', () => {
context.pages().find((page) => page.url() === 'about:blank') ||
(await context.newPage());
await page.goto('queryLink.html');
await page.waitForTimeout(1000);
});

test.afterAll(async function () {
Expand All @@ -17,7 +18,6 @@ test.describe('Playwright Query Link Tests', () => {

test.describe('Query Popup Tests', () => {
test('Query link shows when within bounds', async () => {
await page.waitForTimeout(500);
await page.getByLabel('Interactive map').click();
const popups = await page
.locator('.leaflet-popup-pane')
Expand Down
10 changes: 5 additions & 5 deletions test/e2e/mapml-viewer/viewerContextMenu.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ test.describe('Playwright mapml-viewer Context Menu (and api) Tests', () => {
);
let name = await nameHandle.jsonValue();
await nameHandle.dispose();
expect(name).toEqual('View Fullscreen (F)');
expect(name).toEqual('View fullscreen (F)');
});

test('Context menu tab goes to next item', async () => {
Expand Down Expand Up @@ -111,7 +111,7 @@ test.describe('Playwright mapml-viewer Context Menu (and api) Tests', () => {
);
let name = await nameHandle.jsonValue();
await nameHandle.dispose();
expect(name).toEqual('View Fullscreen (F)');
expect(name).toEqual('View fullscreen (F)');
});

test('Submenu opens on C with focus on first item', async () => {
Expand Down Expand Up @@ -502,10 +502,10 @@ test.describe('Playwright mapml-viewer Context Menu (and api) Tests', () => {
'body > mapml-viewer',
(map) => map.layers[1].label
);
expect(layerLabel).toEqual('Pasted layer');
expect(layerLabel).toEqual('Pasted Layer');
// clean up
await page.$eval('body > mapml-viewer', (map) =>
map.removeChild(map.querySelector('[label="Pasted layer"]'))
map.removeChild(map.querySelector('[label="Pasted Layer"]'))
);
});
// other cs not implemented yet: tile,map,
Expand Down Expand Up @@ -718,7 +718,7 @@ test.describe('Playwright mapml-viewer Context Menu (and api) Tests', () => {
'div > div.mapml-contextmenu > button:nth-child(4)',
(btn) => btn.textContent
);
expect(fullScreen).toEqual('View Fullscreen (F)');
expect(fullScreen).toEqual('View fullscreen (F)');
let copy = await page.$eval(
'div > div.mapml-contextmenu > button:nth-child(6)',
(btn) => btn.textContent
Expand Down

0 comments on commit 5d08594

Please sign in to comment.