From 7b621df27fa0b549b0d4d0d54558fc5eb7a01db3 Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Fri, 30 Jul 2021 18:53:09 +0200 Subject: [PATCH] Support plugin: fix crash because of outdated selector (#428) --- source/plugins/support/index.mjs | 2 +- source/plugins/support/tests.yml | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/source/plugins/support/index.mjs b/source/plugins/support/index.mjs index 2427e45a..0e793c2b 100644 --- a/source/plugins/support/index.mjs +++ b/source/plugins/support/index.mjs @@ -62,7 +62,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal { await page.goto(`https://github.community/u/${login}/badges`) const frame = page.mainFrame() - await frame.waitForSelector(".user-badges-list") + await frame.waitForSelector(".badge-group-list") const badges = await frame.evaluate(() => ({ uniques:[...document.querySelectorAll(".badge-card .badge-link")].map(el => el.innerText), multiples:[...document.querySelectorAll(".grant-count")].map(el => Number(el.innerText)), diff --git a/source/plugins/support/tests.yml b/source/plugins/support/tests.yml index 1158842b..609c062d 100644 --- a/source/plugins/support/tests.yml +++ b/source/plugins/support/tests.yml @@ -1,6 +1,5 @@ -# To comment out once #421 is solved -#- name: Support plugin (default) -# uses: lowlighter/metrics@latest -# with: -# token: MOCKED_TOKEN -# plugin_support: yes +- name: Support plugin (default) + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_support: yes