Задать вопрос
Millerish
@Millerish

Как сделать e2e тестирование используя GitHub action?

Локально тесты проходят. 

Мой конфиг: 

name: E2E

on: push

jobs:
  build:
    name: Test
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@master
      - name: Install Node
        uses: actions/setup-node@v1
        with:
          node-version: 14.8
      - name: npm dependencies
        run: npm install
      - name: npm ci
        run: npm ci
      - name: Build
        run: npm run build
      - name: Run Tests
        run: ./node_modules/.bin/ng e2e


Выводит ошибку: 

...
Run ./node_modules/.bin/ng e2e
[09:54:49] I/file_manager - creating folder /home/runner/work/my-app/my-app/node_modules/webdriver-manager/selenium
[09:54:49] I/config_source - curl -o/home/runner/work/my-app/my-app/node_modules/webdriver-manager/selenium/chrome-response.xml https://chromedriver.storage.googleapis.com/
[09:54:49] I/downloader - curl -o/home/runner/work/my-app/my-app/node_modules/webdriver-manager/selenium/chromedriver_89.0.4389.23.zip https://chromedriver.storage.googleapis.com/89.0.4389.23/chromedriver_linux64.zip
[09:54:49] I/update - chromedriver: unzipping chromedriver_89.0.4389.23.zip
[09:54:49] I/update - chromedriver: setting permissions to 0755 for /home/runner/work/my-app/my-app/node_modules/webdriver-manager/selenium/chromedriver_89.0.4389.23
- Generating browser application bundles...
✔ Browser application bundle generation complete.

Initial Chunk Files                                                                                              | Names                                                                                                         |      Size
vendor.js                                                                                                        | vendor                                                                                                        |   5.38 MB
main.js                                                                                                          | main                                                                                                          | 908.88 kB
styles.css                                                                                                       | styles                                                                                                        | 459.28 kB
scripts.js                                                                                                       | scripts                                                                                                       | 435.83 kB
polyfills.js                                                                                                     | polyfills                                                                                                     | 126.13 kB
runtime.js                                                                                                       | runtime                                                                                                       |  10.20 kB

| Initial Total                                                                                                 |   7.27 MB

Lazy Chunk Files                                                                                                 | Names                                                                                                         |      Size
pages-listing-page-listing-page-module.js                                                                        | pages-listing-page-listing-page-module                                                                        |   1.88 MB
default~pages-entity-page-entity-page-module~pages-listing-page-listing-page-module~pages-members-pa~5128b373.js | default~pages-entity-page-entity-page-module~pages-listing-page-listing-page-module~pages-members-pa~5128b373 |   1.68 MB
pages-entity-page-entity-page-module.js                                                                          | pages-entity-page-entity-page-module                                                                          |   1.14 MB
pages-landing-page-landing-page-module.js                                                                        | pages-landing-page-landing-page-module                                                                        | 626.01 kB
pages-about-page-about-page-module.js                                                                            | pages-about-page-about-page-module                                                                            | 390.07 kB
pages-members-page-members-page-module.js                                                                        | pages-members-page-members-page-module                                                                        | 386.65 kB
pages-all-teams-page-all-teams-page-module.js                                                                    | pages-all-teams-page-all-teams-page-module                                                                    | 369.55 kB
pages-stylesheet-page-stylesheet-page-module.js                                                                  | pages-stylesheet-page-stylesheet-page-module                                                                  | 119.12 kB
default~pages-all-teams-page-all-teams-page-module~pages-entity-page-entity-page-module.js                       | default~pages-all-teams-page-all-teams-page-module~pages-entity-page-entity-page-module                       |  60.71 kB
default~pages-entity-page-entity-page-module~pages-listing-page-listing-page-module.js                           | default~pages-entity-page-entity-page-module~pages-listing-page-listing-page-module                           |  27.46 kB
common.js                                                                                                        | common                                                                                                        |   8.85 kB
pages-not-found-page-not-found-page-module.js                                                                    | pages-not-found-page-not-found-page-module                                                                    |   8.02 kB

Build at: 2021-03-26T09:55:28.695Z - Hash: ce3423c3444606120bab - Time: 36311ms

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **


✔ Compiled successfully.
[09:55:29] I/launcher - Running 1 instances of WebDriver
[09:55:29] I/direct - Using ChromeDriver directly...
Jasmine started

  workspace-project App
    ✗ Test1: footer is present
      - Failed: Wait timed out after 5006ms

      internal/process/task_queues.js:93:5
      jasmine-spec-reporter: unable to open 'internal/process/task_queues.js'
      Error: ENOENT: no such file or directory, open 'internal/process/task_queues.js'

      /home/runner/work/my-app/my-app/projects/dapp/e2e/src/app.e2e-spec.ts:11:3
        })

        it('Test1: footer is present', async () => {
        ~
          await page.navigateTo()
          // @ts-ignore this is necessary maybe

      /home/runner/work/my-app/my-app/projects/dapp/e2e/src/app.e2e-spec.ts:4:1
      import {browser, logging} from 'protractor'

      describe('workspace-project App', () => {
      ~
        let page: AppPage


      internal/modules/cjs/loader.js:1251:30
      jasmine-spec-reporter: unable to open 'internal/modules/cjs/loader.js'
      Error: ENOENT: no such file or directory, open 'internal/modules/cjs/loader.js'
...


Как исправить?
  • Вопрос задан
  • 143 просмотра
Подписаться 2 Простой 1 комментарий
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы