From 5f4888af58c41f3e1acc961d41dab056638b1438 Mon Sep 17 00:00:00 2001 From: dessant Date: Mon, 9 Oct 2023 21:39:40 +0300 Subject: [PATCH] fix: update Global Brand Database --- src/engines/branddb.js | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/src/engines/branddb.js b/src/engines/branddb.js index 7b980433..34f58aa9 100644 --- a/src/engines/branddb.js +++ b/src/engines/branddb.js @@ -1,38 +1,31 @@ import {findNode} from 'utils/common'; import {setFileInputData, initSearch, sendReceipt} from 'utils/engines'; -import {targetEnv} from 'utils/config'; const engine = 'branddb'; async function search({session, search, image, storageIds}) { - await Promise.race([ - findNode('tr[id="0"]'), // desktop - findNode('.flowItemBox .flowItem[foo="0"]') // mobile - ]); - - (await findNode('a[href="#image_filter"]')).click(); - - await findNode('.fileTarget-open'); + await findNode('body[style^="opacity: 1"]', { + observerOptions: {attributes: true, attributeFilter: ['class']} + }); - const inputSelector = 'input#imageFileUpload'; + const inputSelector = 'input#fileInput'; const input = await findNode(inputSelector); - await setFileInputData(inputSelector, input, image, { - patchInput: targetEnv === 'safari' - }); + await setFileInputData(inputSelector, input, image); input.dispatchEvent(new Event('change')); // wait for image to load - await findNode('.ui-icon-pencil'); - - // select Concept strategy - (await findNode('a[data-hasqtip="52"]')).click(); + await findNode('.b-icon--edit'); await sendReceipt(storageIds); window.setTimeout(async () => { - (await findNode('#image_filter .addFilterButton')).click(); + ( + await findNode( + 'button.search.b-button--is-type_primary:not(.b-button--is-disabled)' + ) + ).click(); }, 100); }