Skip to content

Commit

Permalink
Merge branch 'master' into feat/reuse-browser
Browse files Browse the repository at this point in the history
  • Loading branch information
baruchiro authored Nov 24, 2024
2 parents 79d02ea + 28fd0e9 commit 0d1c2e6
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 32 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/component-owners.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Run npm install
run: npm install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nodeCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
node-version: [16.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: browser-actions/setup-chrome@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: prepare default version
run: npm run prepare:default
- name: Release to Github
uses: cycjimmy/semantic-release-action@v2
uses: cycjimmy/semantic-release-action@v4
id: semantic # Need an `id` for output variables
with:
semantic_version: 16.0.2
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Close stale issues and PRs'
on:
workflow_dispatch:
schedule:
- cron: '30 1 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
ascending: true
days-before-close: 14
stale-issue-message: 'Issue has been marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
stale-pr-message: 'Pull request has been marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
close-issue-reason: 'not_planned'
exempt-issue-labels: 'not-stale'
exempt-pr-labels: 'not-stale'
4 changes: 2 additions & 2 deletions src/scrapers/leumi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ async function fetchTransactions(page: Page, startDate: Moment): Promise<Transac
for (const accountId of accountsIds) {
if (accountsIds.length > 1) {
// get list of accounts and check accountId
await clickByXPath(page, 'xpath//*[contains(@class, "number") and contains(@class, "combo-inner")]');
await clickByXPath(page, `xpath//span[contains(text(), '${accountId}')]`);
await clickByXPath(page, 'xpath///*[contains(@class, "number") and contains(@class, "combo-inner")]');
await clickByXPath(page, `xpath///span[contains(text(), '${accountId}')]`);
}

accounts.push(await fetchTransactionsForAccount(page, startDate, removeSpecialCharacters(accountId)));
Expand Down
5 changes: 4 additions & 1 deletion src/scrapers/mizrahi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,12 @@ class MizrahiScraper extends BaseScraperWithBrowser<ScraperSpecificCredentials>
await waitUntilElementFound(this.page, `a[href*="${TRANSACTIONS_PAGE}"]`);
await this.page.$eval(`a[href*="${TRANSACTIONS_PAGE}"]`, (el) => (el as HTMLElement).click());

const accountNumberElement = await this.page.$('#dropdownBasic b');
const accountNumberElement = await this.page.$('#dropdownBasic b span');
const accountNumberHandle = await accountNumberElement?.getProperty('title');
const accountNumber = ((await accountNumberHandle?.jsonValue()) as string);
if (!accountNumber) {
throw new Error('Account number not found');
}

const response = await Promise.any(TRANSACTIONS_REQUEST_URLS.map(async (url) => {
const request = await this.page.waitForRequest(url);
Expand Down

0 comments on commit 0d1c2e6

Please sign in to comment.