Compare commits
5 Commits
200100686d
...
v1.23.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
a77ea0c97d
|
|||
|
208b77a294
|
|||
|
ea3e4dd0dc
|
|||
|
2c2a3e2a4c
|
|||
|
d266bb92bd
|
@@ -21,7 +21,10 @@ const GalleryContent = <template>
|
|||||||
{{@bindKeyboard @handleKeydown}}
|
{{@bindKeyboard @handleKeydown}}
|
||||||
>
|
>
|
||||||
{{! template-lint-disable no-invalid-interactive }}
|
{{! template-lint-disable no-invalid-interactive }}
|
||||||
<div class="photo-gallery-content">
|
<div
|
||||||
|
class="photo-gallery-content"
|
||||||
|
data-current-event-id={{@currentPhoto.eventId}}
|
||||||
|
>
|
||||||
<div class="actions-btn-container">
|
<div class="actions-btn-container">
|
||||||
<DropdownMenu
|
<DropdownMenu
|
||||||
@iconSize={{24}}
|
@iconSize={{24}}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "marco",
|
"name": "marco",
|
||||||
"version": "1.22.0",
|
"version": "1.23.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Unhosted maps app",
|
"description": "Unhosted maps app",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
-2
@@ -39,8 +39,8 @@
|
|||||||
<meta name="msapplication-TileColor" content="#F6E9A6">
|
<meta name="msapplication-TileColor" content="#F6E9A6">
|
||||||
<meta name="msapplication-TileImage" content="/icons/icon-144.png">
|
<meta name="msapplication-TileImage" content="/icons/icon-144.png">
|
||||||
|
|
||||||
<script type="module" crossorigin src="/assets/main-CjSZtg4Y.js"></script>
|
<script type="module" crossorigin src="/assets/main-DSyq2vVy.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/main-BmLeTC2Y.css">
|
<link rel="stylesheet" crossorigin href="/assets/main-COnSXoPt.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="modal-portal"></div>
|
<div id="modal-portal"></div>
|
||||||
|
|||||||
+6
-1
@@ -16,7 +16,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/testem.js" integrity="" data-embroider-ignore></script>
|
<script
|
||||||
|
src="/testem.js"
|
||||||
|
integrity=""
|
||||||
|
data-embroider-ignore
|
||||||
|
vite-ignore
|
||||||
|
></script>
|
||||||
|
|
||||||
<script type="module">import "ember-testing";</script>
|
<script type="module">import "ember-testing";</script>
|
||||||
|
|
||||||
|
|||||||
@@ -287,35 +287,30 @@ module('Integration | Component | photo-gallery', function (hooks) {
|
|||||||
</template>
|
</template>
|
||||||
);
|
);
|
||||||
|
|
||||||
// Let carousel settle
|
assert
|
||||||
await new Promise((resolve) => setTimeout(resolve, 150));
|
.dom('.photo-gallery-content')
|
||||||
|
.hasAttribute('data-current-event-id', 'event1');
|
||||||
|
|
||||||
// Right Arrow
|
// Right Arrow
|
||||||
await triggerKeyEvent(document, 'keydown', 'ArrowRight');
|
await triggerKeyEvent(document, 'keydown', 'ArrowRight');
|
||||||
await new Promise((resolve) => setTimeout(resolve, 150));
|
|
||||||
|
|
||||||
// Let's just assert that currentPhoto was updated internally, which trickles down.
|
|
||||||
// The actual DOM update for the main image might be tricky if the carousel relies on scroll events.
|
|
||||||
// We can at least check if the thumbnail selection changed, as that is directly driven by currentPhoto
|
|
||||||
assert
|
assert
|
||||||
.dom('.thumbnail-strip-container .carousel-slide.active img')
|
.dom('.photo-gallery-content')
|
||||||
.hasAttribute('data-src', 'photo2.jpg');
|
.hasAttribute('data-current-event-id', 'event2');
|
||||||
|
|
||||||
// Right Arrow again
|
// Right Arrow again
|
||||||
await triggerKeyEvent(document, 'keydown', 'ArrowRight');
|
await triggerKeyEvent(document, 'keydown', 'ArrowRight');
|
||||||
await new Promise((resolve) => setTimeout(resolve, 150));
|
|
||||||
|
|
||||||
assert
|
assert
|
||||||
.dom('.thumbnail-strip-container .carousel-slide.active img')
|
.dom('.photo-gallery-content')
|
||||||
.hasAttribute('data-src', 'photo3.jpg');
|
.hasAttribute('data-current-event-id', 'event3');
|
||||||
|
|
||||||
// Left Arrow
|
// Left Arrow
|
||||||
await triggerKeyEvent(document, 'keydown', 'ArrowLeft');
|
await triggerKeyEvent(document, 'keydown', 'ArrowLeft');
|
||||||
await new Promise((resolve) => setTimeout(resolve, 150));
|
|
||||||
|
|
||||||
assert
|
assert
|
||||||
.dom('.thumbnail-strip-container .carousel-slide.active img')
|
.dom('.photo-gallery-content')
|
||||||
.hasAttribute('data-src', 'photo2.jpg');
|
.hasAttribute('data-current-event-id', 'event2');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('escape key closes gallery', async function (assert) {
|
test('escape key closes gallery', async function (assert) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { module, test } from 'qunit';
|
import { module, test } from 'qunit';
|
||||||
import { setupRenderingTest } from 'marco/tests/helpers';
|
import { setupRenderingTest } from 'marco/tests/helpers';
|
||||||
import { render, fillIn, click, waitFor } from '@ember/test-helpers';
|
import { render, fillIn, click, waitFor, focus } from '@ember/test-helpers';
|
||||||
import SearchBox from 'marco/components/search-box';
|
import SearchBox from 'marco/components/search-box';
|
||||||
import Service from '@ember/service';
|
import Service from '@ember/service';
|
||||||
|
|
||||||
@@ -208,18 +208,22 @@ module('Integration | Component | search-box', function (hooks) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Type "Resta" to trigger "Restaurants" category match
|
// Type "Resta" to trigger "Restaurants" category match
|
||||||
|
await focus('.search-input');
|
||||||
await fillIn('.search-input', 'Resta');
|
await fillIn('.search-input', 'Resta');
|
||||||
|
|
||||||
// Wait for debounce (300ms) + execution
|
await waitFor('.search-result-item');
|
||||||
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
||||||
await delay(400);
|
|
||||||
|
|
||||||
// The first result should be the category match
|
const resultItems = Array.from(
|
||||||
assert.dom('.search-result-item').exists({ count: 1 });
|
this.element.querySelectorAll('.search-result-item')
|
||||||
assert.dom('.result-title').hasText('Restaurants');
|
);
|
||||||
|
const categoryResult = resultItems.find((item) =>
|
||||||
|
item.textContent.includes('Restaurants')
|
||||||
|
);
|
||||||
|
|
||||||
|
assert.ok(categoryResult, 'Restaurants category result is shown');
|
||||||
|
|
||||||
// Click the result
|
// Click the result
|
||||||
await click('.search-result-item');
|
await click(categoryResult);
|
||||||
|
|
||||||
// Assert transition with lat/lon from map center
|
// Assert transition with lat/lon from map center
|
||||||
assert.verifySteps([
|
assert.verifySteps([
|
||||||
|
|||||||
Reference in New Issue
Block a user