Skip to content

Commit fc9c1d4

Browse files
committed
test: remove only
1 parent 4b0e8b6 commit fc9c1d4

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

injected/integration-test/autofill-password-import.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ResultsCollector } from './page-objects/results-collector.js';
55
const HTML = '/autofill-password-import/index.html';
66
const CONFIG = './integration-test/test-pages/autofill-password-import/config/config.json';
77

8-
test.only('Password import feature', async ({ page }, testInfo) => {
8+
test('Password import feature', async ({ page }, testInfo) => {
99
const collector = ResultsCollector.create(page, testInfo.project.use);
1010
await collector.load(HTML, CONFIG);
1111

injected/src/features/autofill-password-import.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ export default class AutofillPasswordImport extends ContentFeature {
5151

5252
#domLoaded;
5353

54-
/** @type {Set<string>} */
55-
#animatedPaths = new Set();
54+
/** @type {Set<Element>} */
55+
#tappedElements = new Set();
5656

5757
/**
5858
* @returns {ButtonAnimationStyle}
@@ -183,6 +183,9 @@ export default class AutofillPasswordImport extends ContentFeature {
183183
this.currentOverlay.remove();
184184
this.currentOverlay = null;
185185
document.removeEventListener('scroll', this);
186+
if (this.currentElementConfig?.element) {
187+
this.#tappedElements.delete(this.currentElementConfig?.element);
188+
}
186189
}
187190
}
188191

@@ -405,10 +408,10 @@ export default class AutofillPasswordImport extends ContentFeature {
405408
if (this.isSupportedPath(path)) {
406409
try {
407410
this.setCurrentElementConfig(await this.getElementAndStyleFromPath(path));
408-
if (!this.#animatedPaths.has(path)) {
411+
if (this.currentElementConfig?.element && !this.#tappedElements.has(this.currentElementConfig?.element)) {
409412
await this.animateOrTapElement();
410413
if (this.currentElementConfig?.shouldTap && this.currentElementConfig?.tapOnce) {
411-
this.#animatedPaths.add(path);
414+
this.#tappedElements.add(this.currentElementConfig.element);
412415
}
413416
}
414417
} catch {

0 commit comments

Comments
 (0)