Skip to content

Commit

Permalink
feat(test): cypress recording fix
Browse files Browse the repository at this point in the history
Headless recording enabled.

n/a
  • Loading branch information
jdre-c8y committed Jun 21, 2024
1 parent da05e82 commit e61a1af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cypress/e2e/datapoints-graph/datapoints-graph-1020.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ describe('datapoints-graph', { tags: '@1020' }, () => {
'/inventory/managedObjects?fragmentType=c8y_Dashboard!name!home-cockpit1&pageSize=1',
{ fixture: 'widgets/datapoints-graph/cockpit-dashboard.json' }
).as('cockpitDashboardConfig');
cy.getAuth('admin').login();
// TODO: make it configurable
cy.useAuth('admin').login();
// TODO: make it configurable OR make sure folder is called 'cockpit'
cy.visit(
'/apps/cockpit/index.html?remotes=%7B"sag-pkg-community-plugins"%3A%5B"ExampleWidgetPluginModule"%2C"DatapointsGraphWidgetModule"%5D%7D#/'
);
// cy.visit('/apps/sag-pkg-community-plugins/#/');
cy.wait('@cockpitDashboardConfig');
cy.wait('@cockpitDashboardConfig', { timeout: 10_000 });
});

it('view component should be present', () => {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"commit": "commit",
"cypress:ci:plugins": "start-server-and-test http-server http://localhost:4200/apps/sag-pkg-community-plugins/index.html cypress:headless:plugins",
"cypress:headless:plugins": "cypress run --env grepUntagged=true",
"cypress:headless:shell:recording": "cypress run --env grepTags=@1020 C8Y_CTRL_MODE=recording",
"cypress:headless:shell:mocking": "cypress run --env grepTags=@1020 C8Y_CTRL_MODE=mocking",
"cypress:headless:shell:recording": "cypress run --env C8Y_CTRL_MODE=recording,grepTags=@1020",
"cypress:headless:shell:mocking": "cypress run --env C8Y_CTRL_MODE=mocking,grepTags=@1020",
"cypress:open": "cypress open",
"deploy": "c8ycli deploy",
"http-server": "http-server -p 4200 ./dist",
Expand All @@ -21,7 +21,7 @@
"lint:staged": "lint-staged",
"prepare": "husky install",
"collect-shell-versions": "node collect-shell-versions",
"cypress:recording": "npx c8yctrl --config c8yctrl.config.ts --port 4200 --staticRoot ./dist --folder ./rec & yarn cypress:headless --env C8Y_CTRL_MODE=recording"
"cypress:recording": "npx c8yctrl --config c8yctrl.config.ts --baseUrl https://ccw.latest.stage.c8y.io --port 4200 --staticRoot ./dist --folder ./cypress/rec & cypress:headless:shell:recording"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit e61a1af

Please sign in to comment.