diff --git a/.github/scripts/build_assets/SeleniumRunner.py b/.github/scripts/build_assets/SeleniumRunner.py index 596ea5b4..4c659a2b 100644 --- a/.github/scripts/build_assets/SeleniumRunner.py +++ b/.github/scripts/build_assets/SeleniumRunner.py @@ -75,6 +75,14 @@ class SeleniumRunner: self.driver = WebDriver(options=options, executable_path=geckodriver_path) self.driver.get(self.ICOMOON_URL) assert "IcoMoon App" in self.driver.title + + # wait until the whole web page is loaded by testing the hamburger input + hamburger_input = WebDriverWait(self.driver, SeleniumRunner.LONG_WAIT_IN_SEC).until( + ec.element_to_be_clickable((By.CSS_SELECTOR, + "button.btn5.lh-def.transparent i.icon-menu")) + ) + hamburger_input.click() + print("Accessed icomoon.io") def upload_icomoon(self, icomoon_json_path: str): """ @@ -86,7 +94,7 @@ class SeleniumRunner: try: # find the file input and enter the file path import_btn = WebDriverWait(self.driver, SeleniumRunner.LONG_WAIT_IN_SEC).until( - ec.presence_of_element_located((By.CSS_SELECTOR, "div#file input")) + ec.element_to_be_clickable((By.CSS_SELECTOR, "div#file input")) ) import_btn.send_keys(icomoon_json_path) except Exception as e: @@ -138,6 +146,7 @@ class SeleniumRunner: ec.element_to_be_clickable((By.XPATH, "//button[text()='Select All']")) ) select_all_button.click() + print("Finished uploading the svgs...") except Exception as e: self.close() raise e @@ -155,7 +164,7 @@ class SeleniumRunner: ) menu_appear_callback = ec.element_to_be_clickable( - (By.CSS_SELECTOR, "h1#setH2 ul") + (By.CSS_SELECTOR, "h1 ul.menuList2") ) while not menu_appear_callback(self.driver): diff --git a/.github/workflows/peek_icons.yml b/.github/workflows/peek_icons.yml index 5ebfa8a1..30bacbb9 100644 --- a/.github/workflows/peek_icons.yml +++ b/.github/workflows/peek_icons.yml @@ -37,4 +37,17 @@ jobs: if: ${{success()}} with: name: new_icons - path: ./new_icons.png \ No newline at end of file + path: ./new_icons.png + - name: Comment on the PR about the result + uses: github-actions-up-and-running/pr-comment@v1.0.1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + message: > + Hi! I'm Devicons' GitHub Actions Bot! + + I just peeked at the icons that you wanted to add and upload them to the + [Actions page](https://github.com/devicons/devicon/actions). The maintainers + will now take a look at it and decide whether to merge your PR. + + Cheers :), + Bot diff --git a/devicon.json b/devicon.json index 46ad2d2c..3dc55fcb 100644 --- a/devicon.json +++ b/devicon.json @@ -1469,8 +1469,7 @@ "plain" ], "font": [ - "line", - "plain" + "line" ] }, "color": "#F0D6B7",