Skip to content

Commit b608cbd

Browse files
DeltaMichaelDilyan Marinov
andauthored
frontend: quickstart-vdk operability tests using cypress (#2359)
## Why? We test that the docker image is starting correctly, but we don't actually test that the frontend is operational. This has resulted in docker images where the docker image starts, but the frontend is not operational with no way of detecting the problem. ## What? - Move regular e2e tests into their own directory - Introduce quickstart-smoke script - Create basic cypress smoke test for the frontend - Run smoke test after deployment to test environment ## How was this tested? Ran quickstart-vdk locally and ran cypress against frontend CI on localhost:8092 Ran smoke tests and e2e tests in CI https://gitlab.com/vmware-analytics/versatile-data-kit/-/pipelines/921430730 ## What kind of change is this? Feature/non-breaking Signed-off-by: Dilyan Marinov <mdilyan@vmware.com> Co-authored-by: Dilyan Marinov <mdilyan@vmware.com>
1 parent e94501a commit b608cbd

17 files changed

Lines changed: 149 additions & 22 deletions

File tree

projects/frontend/cicd/.gitlab-ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ frontend_publish_ui_image:
148148

149149
frontend_deploy_testing_data_pipelines:
150150
stage: pre_release_test
151+
needs:
152+
- job: frontend-data-pipelines-e2e-tests
153+
optional: false
154+
artifacts: false
151155
image: docker:23.0.1
152156
script:
153157
- apk --no-cache add bash openssl curl git gettext zip py-pip
@@ -191,6 +195,30 @@ frontend_heartbeat_test:
191195
- if: '$CI_COMMIT_BRANCH == "main"'
192196
changes: *frontend_data_pipelines_locations
193197

198+
frontend_quickstart_operability_test:
199+
stage: pre_release_test
200+
needs:
201+
- job: frontend_heartbeat_test
202+
optional: false
203+
artifacts: false
204+
- job: frontend-data-pipelines-build
205+
optional: false
206+
artifacts: true
207+
image: "versatiledatakit/vdk-cicd-base-gui:2.0.0"
208+
before_script:
209+
- cd projects/frontend/data-pipelines/gui
210+
script:
211+
- export CYPRESS_BASE_URL=http://cicd-control-service-ui:80
212+
- npm run quickstart-smoke
213+
retry: !reference [.frontend_retry, retry_options]
214+
rules:
215+
- if: '$CI_PIPELINE_SOURCE == "schedule"'
216+
when: never
217+
- if: '$CI_COMMIT_BRANCH == "main"'
218+
changes: *frontend_shared_components_locations
219+
- if: '$CI_COMMIT_BRANCH == "main"'
220+
changes: *frontend_data_pipelines_locations
221+
194222
frontend_publish_test_image:
195223
stage: release_image
196224
script:

projects/frontend/data-pipelines/gui/e2e/integration/explore/data-jobs/data-jobs.spec.js renamed to projects/frontend/data-pipelines/gui/e2e/integration/frontend-tests/explore/data-jobs/data-jobs.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
/// <reference types="cypress" />
77

8-
import { DataJobsExplorePage } from '../../../support/pages/explore/data-jobs/data-jobs.po';
9-
import { DataJobExploreDetailsPage } from '../../../support/pages/explore/data-jobs/details/data-job-details.po';
8+
import { DataJobsExplorePage } from '../../../../support/pages/explore/data-jobs/data-jobs.po';
9+
import { DataJobExploreDetailsPage } from '../../../../support/pages/explore/data-jobs/details/data-job-details.po';
1010

1111
describe(
1212
'Data Jobs Explore Page',

projects/frontend/data-pipelines/gui/e2e/integration/explore/data-jobs/details/data-job-details.spec.js renamed to projects/frontend/data-pipelines/gui/e2e/integration/frontend-tests/explore/data-jobs/details/data-job-details.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
/// <reference types="cypress" />
77

8-
import { DataJobsExplorePage } from '../../../../support/pages/explore/data-jobs/data-jobs.po';
9-
import { DataJobExploreDetailsPage } from '../../../../support/pages/explore/data-jobs/details/data-job-details.po';
8+
import { DataJobsExplorePage } from '../../../../../support/pages/explore/data-jobs/data-jobs.po';
9+
import { DataJobExploreDetailsPage } from '../../../../../support/pages/explore/data-jobs/details/data-job-details.po';
1010

1111
describe(
1212
'Data Job Explore Details Page',

projects/frontend/data-pipelines/gui/e2e/integration/explore/data-jobs/executions/data-job-executions.spec.js renamed to projects/frontend/data-pipelines/gui/e2e/integration/frontend-tests/explore/data-jobs/executions/data-job-executions.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
/// <reference types="cypress" />
77

8-
import { DataJobDetailsBasePO } from '../../../../support/pages/base/data-pipelines/data-job-details-base.po';
8+
import { DataJobDetailsBasePO } from '../../../../../support/pages/base/data-pipelines/data-job-details-base.po';
99

10-
import { DataJobsExplorePage } from '../../../../support/pages/explore/data-jobs/data-jobs.po';
11-
import { DataJobExploreExecutionsPage } from '../../../../support/pages/explore/data-jobs/executions/data-job-executions.po';
10+
import { DataJobsExplorePage } from '../../../../../support/pages/explore/data-jobs/data-jobs.po';
11+
import { DataJobExploreExecutionsPage } from '../../../../../support/pages/explore/data-jobs/executions/data-job-executions.po';
1212

1313
describe(
1414
'Data Job Explore Executions Page',

projects/frontend/data-pipelines/gui/e2e/integration/get-started/get-started-page-data-jobs-health-overview.spec.js renamed to projects/frontend/data-pipelines/gui/e2e/integration/frontend-tests/get-started/get-started-page-data-jobs-health-overview.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
/// <reference types="cypress" />
77

8-
import { TEAM_VDK_DATA_JOB_FAILING } from '../../support/helpers/constants.support';
8+
import { TEAM_VDK_DATA_JOB_FAILING } from '../../../support/helpers/constants.support';
99

10-
import { GetStartedDataJobsHealthOverviewWidgetPO } from '../../support/pages/get-started/get-started-page-data-jobs-health-overview.po';
11-
import { DataJobManageDetailsPage } from '../../support/pages/manage/data-jobs/details/data-job-details.po';
12-
import { DataJobManageExecutionsPage } from '../../support/pages/manage/data-jobs/executions/data-job-executions.po';
10+
import { GetStartedDataJobsHealthOverviewWidgetPO } from '../../../support/pages/get-started/get-started-page-data-jobs-health-overview.po';
11+
import { DataJobManageDetailsPage } from '../../../support/pages/manage/data-jobs/details/data-job-details.po';
12+
import { DataJobManageExecutionsPage } from '../../../support/pages/manage/data-jobs/executions/data-job-executions.po';
1313

1414
describe(
1515
'Get Started Page: Data Jobs Health Overview Widget',

projects/frontend/data-pipelines/gui/e2e/integration/get-started/get-started-page.spec.js renamed to projects/frontend/data-pipelines/gui/e2e/integration/frontend-tests/get-started/get-started-page.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
/// <reference types="cypress" />
77

8-
import { GetStartedPagePO } from '../../support/pages/get-started/get-started-page.po';
8+
import { GetStartedPagePO } from '../../../support/pages/get-started/get-started-page.po';
99

1010
describe(
1111
'Get Started Page',

projects/frontend/data-pipelines/gui/e2e/integration/manage/data-jobs/data-jobs.spec.js renamed to projects/frontend/data-pipelines/gui/e2e/integration/frontend-tests/manage/data-jobs/data-jobs.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
/// <reference types="cypress" />
77

8-
import { DataJobsManagePage } from '../../../support/pages/manage/data-jobs/data-jobs.po';
9-
import { DataJobManageDetailsPage } from '../../../support/pages/manage/data-jobs/details/data-job-details.po';
8+
import { DataJobsManagePage } from '../../../../support/pages/manage/data-jobs/data-jobs.po';
9+
import { DataJobManageDetailsPage } from '../../../../support/pages/manage/data-jobs/details/data-job-details.po';
1010

1111
describe(
1212
'Data Jobs Manage Page',

projects/frontend/data-pipelines/gui/e2e/integration/manage/data-jobs/details/data-job-details.spec.js renamed to projects/frontend/data-pipelines/gui/e2e/integration/frontend-tests/manage/data-jobs/details/data-job-details.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
/// <reference types="cypress" />
77

8-
import { compareDatesASC } from '../../../../plugins/helpers/job-helpers.plugins';
8+
import { compareDatesASC } from '../../../../../plugins/helpers/job-helpers.plugins';
99

10-
import { DataJobsManagePage } from '../../../../support/pages/manage/data-jobs/data-jobs.po';
11-
import { DataJobManageDetailsPage } from '../../../../support/pages/manage/data-jobs/details/data-job-details.po';
10+
import { DataJobsManagePage } from '../../../../../support/pages/manage/data-jobs/data-jobs.po';
11+
import { DataJobManageDetailsPage } from '../../../../../support/pages/manage/data-jobs/details/data-job-details.po';
1212

1313
describe(
1414
'Data Job Manage Details Page',

projects/frontend/data-pipelines/gui/e2e/integration/manage/data-jobs/executions/data-job-executions.spec.js renamed to projects/frontend/data-pipelines/gui/e2e/integration/frontend-tests/manage/data-jobs/executions/data-job-executions.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
/// <reference types="cypress" />
77

8-
import { DataJobsManagePage } from '../../../../support/pages/manage/data-jobs/data-jobs.po';
9-
import { DataJobManageExecutionsPage } from '../../../../support/pages/manage/data-jobs/executions/data-job-executions.po';
8+
import { DataJobsManagePage } from '../../../../../support/pages/manage/data-jobs/data-jobs.po';
9+
import { DataJobManageExecutionsPage } from '../../../../../support/pages/manage/data-jobs/executions/data-job-executions.po';
1010

1111
describe(
1212
'Data Job Manage Executions Page',

projects/frontend/data-pipelines/gui/e2e/integration/router/router.spec.js renamed to projects/frontend/data-pipelines/gui/e2e/integration/frontend-tests/router/router.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66
/// <reference types="cypress" />
77

8-
import { BasePagePO } from '../../support/pages/base/base-page.po';
9-
import { GetStartedPagePO } from '../../support/pages/get-started/get-started-page.po';
8+
import { BasePagePO } from '../../../support/pages/base/base-page.po';
109

1110
describe('Routing for pages', () => {
1211
describe('smoke', { tags: ['@smoke'] }, () => {

0 commit comments

Comments
 (0)