Compare commits

...

5 Commits

Author SHA1 Message Date
raucao a77ea0c97d 1.23.0
CI / Lint (push) Successful in 32s
CI / Test (push) Successful in 54s
2026-06-05 18:57:28 +04:00
raucao 208b77a294 Merge pull request 'Optionally add suggested tags to place photos' (#58) from feature/photo_tags into master
CI / Lint (push) Successful in 32s
CI / Test (push) Successful in 54s
Reviewed-on: #58
2026-06-05 14:51:15 +00:00
raucao ea3e4dd0dc Fix warning when running tests
CI / Lint (pull_request) Successful in 32s
CI / Test (pull_request) Successful in 52s
Release Drafter / Update release notes draft (pull_request) Successful in 4s
2026-06-05 18:46:10 +04:00
raucao 2c2a3e2a4c Fix flaky test
CI / Lint (pull_request) Successful in 32s
CI / Test (pull_request) Successful in 55s
Wait for specific actions/elements
2026-06-05 18:37:40 +04:00
raucao d266bb92bd Use data attribute to determine current gallery photo in test 2026-06-05 18:33:08 +04:00
10 changed files with 40 additions and 33 deletions
+4 -1
View File
@@ -21,7 +21,10 @@ const GalleryContent = <template>
{{@bindKeyboard @handleKeydown}}
>
{{! 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">
<DropdownMenu
@iconSize={{24}}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "marco",
"version": "1.22.0",
"version": "1.23.0",
"private": true,
"description": "Unhosted maps app",
"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
View File
@@ -39,8 +39,8 @@
<meta name="msapplication-TileColor" content="#F6E9A6">
<meta name="msapplication-TileImage" content="/icons/icon-144.png">
<script type="module" crossorigin src="/assets/main-CjSZtg4Y.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-BmLeTC2Y.css">
<script type="module" crossorigin src="/assets/main-DSyq2vVy.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-COnSXoPt.css">
</head>
<body>
<div id="modal-portal"></div>
+6 -1
View File
@@ -16,7 +16,12 @@
</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>
@@ -287,35 +287,30 @@ module('Integration | Component | photo-gallery', function (hooks) {
</template>
);
// Let carousel settle
await new Promise((resolve) => setTimeout(resolve, 150));
assert
.dom('.photo-gallery-content')
.hasAttribute('data-current-event-id', 'event1');
// Right Arrow
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
.dom('.thumbnail-strip-container .carousel-slide.active img')
.hasAttribute('data-src', 'photo2.jpg');
.dom('.photo-gallery-content')
.hasAttribute('data-current-event-id', 'event2');
// Right Arrow again
await triggerKeyEvent(document, 'keydown', 'ArrowRight');
await new Promise((resolve) => setTimeout(resolve, 150));
assert
.dom('.thumbnail-strip-container .carousel-slide.active img')
.hasAttribute('data-src', 'photo3.jpg');
.dom('.photo-gallery-content')
.hasAttribute('data-current-event-id', 'event3');
// Left Arrow
await triggerKeyEvent(document, 'keydown', 'ArrowLeft');
await new Promise((resolve) => setTimeout(resolve, 150));
assert
.dom('.thumbnail-strip-container .carousel-slide.active img')
.hasAttribute('data-src', 'photo2.jpg');
.dom('.photo-gallery-content')
.hasAttribute('data-current-event-id', 'event2');
});
test('escape key closes gallery', async function (assert) {
@@ -1,6 +1,6 @@
import { module, test } from 'qunit';
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 Service from '@ember/service';
@@ -208,18 +208,22 @@ module('Integration | Component | search-box', function (hooks) {
);
// Type "Resta" to trigger "Restaurants" category match
await focus('.search-input');
await fillIn('.search-input', 'Resta');
// Wait for debounce (300ms) + execution
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
await delay(400);
await waitFor('.search-result-item');
// The first result should be the category match
assert.dom('.search-result-item').exists({ count: 1 });
assert.dom('.result-title').hasText('Restaurants');
const resultItems = Array.from(
this.element.querySelectorAll('.search-result-item')
);
const categoryResult = resultItems.find((item) =>
item.textContent.includes('Restaurants')
);
assert.ok(categoryResult, 'Restaurants category result is shown');
// Click the result
await click('.search-result-item');
await click(categoryResult);
// Assert transition with lat/lon from map center
assert.verifySteps([