diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml index 97769f2..1256b2d 100644 --- a/.github/workflows/features.yml +++ b/.github/workflows/features.yml @@ -1,51 +1,32 @@ name: Features on: - workflow_dispatch: + workflow_call: inputs: - platform_branch: - description: 'Input Platform branch' - required: false - default: 'master' - talent_portal_branch: - description: 'Input Talent Portal branch' - required: false - default: 'master' - billing_branch: - description: 'Input Billing branch' - required: false - default: 'master' - job_name: - description: 'Input Job Name for Testbox' + name: type: string required: true - cucumber_profile: - description: 'Input Cucumber Profile' - type: string - required: true - worker_count: - description: 'Input Number of Worker' - type: number + secrets: + PAT: required: true - + jobs: - features: - name: Run features + test: + name: Run test runs-on: ubuntu-latest steps: - - name: Set custom ENV - run: | - echo "TESTBOX_BRANCH_PLATFORM=${{ github.event.inputs.platform_branch}}" >> $GITHUB_ENV - echo "TESTBOX_BRANCH_TALENT_PORTAL=${{ github.event.inputs.talent_portal_branch}}" >> $GITHUB_ENV - echo "TESTBOX_BRANCH_BILLING=${{ github.event.inputs.billing_branch}}" >> $GITHUB_ENV - echo "WORKER_COUNT=${{ github.event.inputs.worker_count}}" >> $GITHUB_ENV - echo "JOB_NAME=${{ github.event.inputs.job_name}}" >> $GITHUB_ENV - echo "CUCUMBER_PROFILE=${{ github.event.inputs.cucumber_profile }}" >> $GITHUB_ENV - - - name: Print Set ENV - run: | - echo ${{env.TESTBOX_BRANCH_PLATFORM}} - echo ${{env.TESTBOX_BRANCH_TALENT_PORTAL}} - echo ${{env.TESTBOX_BRANCH_BILLING}} - echo ${{env.WORKER_COUNT}} - echo ${{env.JOB_NAME}} - echo ${{env.CUCUMBER_PROFILE}} \ No newline at end of file + - name: Print out inputs + run: echo ${{inputs.name}} + # - name: Test Action + # uses: convictional/trigger-workflow-and-wait@v1.3.0 + # with: + # owner: ebeagusamuel + # repo: newsweek-clone + # workflow_file_name: features.yml + # github_token: ${{ secrets.PAT }} + # ref: master + # wait_interval: 10 + # propagate_failure: true + # wait_workflow: true + + + \ No newline at end of file diff --git a/README.md b/README.md index 3fa8e2b..6ae28b4 100644 --- a/README.md +++ b/README.md @@ -56,3 +56,4 @@ Give a ⭐️ if you like this project! This project is [MIT](lic.url) licensed. +#### Test diff --git a/bin/controller.rb b/bin/controller.rb index ad44ecc..9671552 100755 --- a/bin/controller.rb +++ b/bin/controller.rb @@ -7,7 +7,6 @@ scraped = scrapper_obj.scrape page = Page.new(scraped) arr = page.details - # rubocop disable: Layout/LineLength def display_details(details) count = 1 diff --git a/lib/scrapper.rb b/lib/scrapper.rb index 9c5c899..0a3bce1 100644 --- a/lib/scrapper.rb +++ b/lib/scrapper.rb @@ -12,7 +12,7 @@ def scrape scraped_pages = [] page_body = HTTParty.get(url).body doc = Nokogiri::HTML(page_body) - doc.css('tr.cmc-table-row').each do |node| + doc.css('table.cmc-table tbody tr').each do |node| scraped_pages << node end scraped_pages