-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (25 loc) · 11 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
name: 'build-test'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- master
- 'releases/*'
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
npm install
- run: |
NODE_OPTIONS=--openssl-legacy-provider npm run all
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: test_result
uses: ./
with:
jsonInput: "{\"stats\":{\"suites\":7,\"tests\":19,\"passes\":0,\"pending\":11,\"failures\":2,\"testsRegistered\":19,\"passPercent\":0,\"pendingPercent\":57.89473684210526,\"other\":0,\"hasOther\":false,\"skipped\":6,\"hasSkipped\":true,\"start\":\"2023-03-30T14:19:15.957Z\",\"end\":\"2023-03-30T14:19:36.923Z\",\"duration\":20966},\"results\":[{\"uuid\":\"a1619161-5116-43e3-9cf1-3c3a0730cb4b\",\"title\":\"\",\"fullFile\":\"cypress/e2e/e2e/component_spec.js\",\"file\":\"cypress/e2e/e2e/component_spec.js\",\"beforeHooks\":[],\"afterHooks\":[],\"tests\":[],\"suites\":[{\"uuid\":\"a1b232a0-37be-4099-b14b-837411d43bcf\",\"title\":\"Component Spec\",\"fullFile\":\"\",\"file\":\"\",\"beforeHooks\":[],\"afterHooks\":[],\"tests\":[{\"title\":\"Drag All Visible component on canvas\",\"fullTitle\":\"Component Spec Drag All Visible component on canvas\",\"timedOut\":null,\"duration\":0,\"state\":\"pending\",\"speed\":null,\"pass\":false,\"fail\":false,\"pending\":false,\"context\":null,\"code\":\"// halted until fix for pointer-up error in ci environment\\ncy.get(\\\".component-drawer-svg-container[draggable='true']\\\").each(ele => {\\n const elem = cy.get(ele);\\n elem.click();\\n elem.drag(\\\"#cy-canvas-container\\\", {\\n force: true\\n });\\n cy.get(\\\"#component-delete\\\", {\\n timeout: 3000\\n }).click();\\n cy.wait(100);\\n});\",\"err\":{},\"uuid\":\"41d0f2ed-0509-4fa5-acea-87a77db3a4ce\",\"parentUUID\":\"a1b232a0-37be-4099-b14b-837411d43bcf\",\"isHook\":false,\"skipped\":true}],\"suites\":[],\"passes\":[],\"failures\":[],\"pending\":[],\"skipped\":[\"41d0f2ed-0509-4fa5-acea-87a77db3a4ce\"],\"duration\":0,\"root\":false,\"rootEmpty\":false,\"_timeout\":2000}],\"passes\":[],\"failures\":[],\"pending\":[],\"skipped\":[],\"duration\":0,\"root\":true,\"rootEmpty\":true,\"_timeout\":2000},{\"uuid\":\"51d4d821-8a77-4485-8ed8-241b9913cb87\",\"title\":\"\",\"fullFile\":\"cypress/e2e/e2e/design_spec.js\",\"file\":\"cypress/e2e/e2e/design_spec.js\",\"beforeHooks\":[],\"afterHooks\":[],\"tests\":[],\"suites\":[{\"uuid\":\"c2eebbef-f690-4273-a628-63ce06df662e\",\"title\":\"Designer Spec\",\"fullFile\":\"\",\"file\":\"\",\"beforeHooks\":[],\"afterHooks\":[],\"tests\":[{\"title\":\"Load MeshMap Design with a click\",\"fullTitle\":\"Designer Spec Load MeshMap Design with a click\",\"timedOut\":null,\"duration\":263,\"state\":\"failed\",\"speed\":null,\"pass\":false,\"fail\":true,\"pending\":false,\"context\":null,\"code\":\"cy.get(\\\"[data-cy='design-drawer']\\\").click();\\ncy.get(\\\"#MUIDataTableBodyRow-patterns-0\\\", {\\n timeout: 30000\\n});\\ncy.wait(2000);\\ncy.intercept(\\\"/api/pattern*\\\").as(\\\"patternLoad\\\");\\ncy.get(\\\"#MUIDataTableBodyRow-patterns-0\\\").click(); //convention: MUIDataTableBodyRow + type + rowIndex\\ncy.wait(\\\"@patternLoad\\\"); // cy.get(\\\"[data-cy='progress-snackbar']\\\").contains(\\\"Rendering your MeshMap...\\\");\\ncy.wait(2000);\\ncy.get(\\\"body\\\").then(body => {\\n if (body.find(\\\"[aria-describedby='notistack-snackbar'] #notistack-snackbar\\\").length > 0) {\\n cy.get(\\\"[aria-describedby='notistack-snackbar'] #notistack-snackbar\\\").should(\\\"not.contain\\\", \\\"Unable to render\\\");\\n }\\n});\",\"err\":{\"message\":\"CypressError: `cy.setCookie()` must be passed two string arguments for `name` and `value`.\\n\\nhttps://on.cypress.io/setcookie\\n\\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Designer Spec`\",\"estack\":\"CypressError: `cy.setCookie()` must be passed two string arguments for `name` and `value`.\\n\\nhttps://on.cypress.io/setcookie\\n\\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Designer Spec`\\n at Context.setCookie (http://localhost:9081/__cypress/runner/cypress_runner.js:139922:78)\\n at wrapped (http://localhost:9081/__cypress/runner/cypress_runner.js:156177:43)\\nFrom Your Spec Code:\\n at Context.eval (webpack:///./cypress/support/commands.js:32:5)\",\"diff\":null},\"uuid\":\"ebba4945-707f-4b30-a1e2-ef66ef8a3cee\",\"parentUUID\":\"c2eebbef-f690-4273-a628-63ce06df662e\",\"isHook\":false,\"skipped\":false},{\"title\":\"Rename Design\",\"fullTitle\":\"Designer Spec Rename Design\",\"timedOut\":null,\"duration\":0,\"state\":\"skipped\",\"speed\":null,\"pass\":false,\"fail\":false,\"pending\":false,\"context\":null,\"code\":\"cy.get(\\\"#component-drawer-Application\\\").should('be.visible').drag(\\\"#cy-canvas-container\\\", {\\n force: true\\n});\\ncy.wait(2000); // let it open the rjsf successfully\\ncy.get(\\\"[data-cy='design-drawer']\\\").click(); // to close the rjsf form by click event\\ncy.intercept('/api/pattern').as('patternSave');\\ncy.get(\\\"#design-name-textfield\\\").focus().clear().type(cypressModifiedDesignName);\\ncy.wait(\\\"@patternSave\\\").then(() => {\\n // move to drawer and check for update\\n cy.get(\\\"[data-cy='design-drawer']\\\").click();\\n cy.get(\\\"#MUIDataTableBodyRow-patterns-0 p\\\", {\\n timeout: 30000\\n });\\n cy.wait(2500);\\n cy.get(\\\"#MUIDataTableBodyRow-patterns-0 p\\\").contains(cypressModifiedDesignName);\\n});\",\"err\":{},\"uuid\":\"1d8cc2fa-0984-49e7-8bc1-1996c6f7fcee\",\"parentUUID\":\"c2eebbef-f690-4273-a628-63ce06df662e\",\"isHook\":false,\"skipped\":true},{\"title\":\"Search a design\",\"fullTitle\":\"Designer Spec Search a design\",\"timedOut\":null,\"duration\":0,\"state\":\"skipped\",\"speed\":null,\"pass\":false,\"fail\":false,\"pending\":false,\"context\":null,\"code\":\"cy.get(\\\"[data-cy='design-drawer']\\\").click();\\ncy.get(\\\"#MUIDataTableBodyRow-patterns-0\\\", {\\n timeout: 30000\\n});\\ncy.wait(2000);\\ncy.get(\\\"#MUIDataTableBodyRow-patterns-0\\\").click();\\ncy.intercept(\\\"/api/pattern*\\\").as(\\\"patternSearch\\\");\\ncy.get('[data-test-id=\\\"Search\\\"]').type(cypressModifiedDesignName);\\ncy.wait(\\\"@patternSearch\\\");\\ncy.get(\\\"#MUIDataTableBodyRow-patterns-0\\\").should(\\\"be.visible\\\").contains(cypressModifiedDesignName);\",\"err\":{},\"uuid\":\"3a712a5a-0661-4035-bada-a4b133aad6c5\",\"parentUUID\":\"c2eebbef-f690-4273-a628-63ce06df662e\",\"isHook\":false,\"skipped\":true},{\"title\":\"Validate a design\",\"fullTitle\":\"Designer Spec Validate a design\",\"timedOut\":null,\"duration\":0,\"state\":\"skipped\",\"speed\":null,\"pass\":false,\"fail\":false,\"pending\":false,\"context\":null,\"code\":\"cy.visit(_constants.cypressTestDesign.url);\\ncy.intercept({\\n url: _constants.cytoConversion.url,\\n method: _constants.cytoConversion.method\\n}).as(_constants.cytoConversion.alias);\\ncy.wait(\\\"@extensionFileLoad\\\", {\\n timeout: 10000\\n}); // wait for MeshMap UI\\ncy.wait(_constants.cytoConversion.wait);\\ncy.wait(_constants.TIME.XLARGE); // wait for rendering\\ncy.get(\\\"#verify-design-btn\\\").click();\\ncy.get('[data-cy=\\\"validate-btn-modal\\\"]').click();\\ncy.contains(\\\"Validate\\\");\\ncy.contains(\\\"OK\\\");\",\"err\":{},\"uuid\":\"e444a863-207a-4bc6-aad6-5c753f16d68d\",\"parentUUID\":\"c2eebbef-f690-4273-a628-63ce06df662e\",\"isHook\":false,\"skipped\":true},{\"title\":\"Deploy and Undeploy a design\",\"fullTitle\":\"Designer Spec Deploy and Undeploy a design\",\"timedOut\":null,\"duration\":0,\"state\":\"skipped\",\"speed\":null,\"pass\":false,\"fail\":false,\"pending\":false,\"context\":null,\"code\":\"cy.get(\\\"[data-cy='design-drawer']\\\").click();\\ncy.get(\\\"#MUIDataTableBodyRow-patterns-0\\\", {\\n timeout: 30000\\n});\\ncy.wait(2000);\\ncy.get(\\\"#MUIDataTableBodyRow-patterns-0\\\").click();\\ncy.get('[data-test-id=\\\"Search\\\"]').type(argoRolloutDesign);\\ncy.intercept(\\\"/api/pattern*\\\").as(\\\"patternPost\\\");\\ncy.wait(1500);\\ncy.get(\\\"#MUIDataTableBodyRow-patterns-0\\\").should(\\\"be.visible\\\").contains(argoRolloutDesign);\\ncy.wait(2000);\\ncy.get(\\\"#MUIDataTableBodyRow-patterns-0\\\").click({\\n force: true\\n}).wait(\\\"@patternPost\\\");\\ncy.wait(2000); // rendering done up until this point\\ncy.get(\\\"body\\\").then(body => {\\n if (body.find(\\\"[aria-describedby='notistack-snackbar'] #notistack-snackbar\\\").length > 0) {\\n cy.get(\\\"[aria-describedby='notistack-snackbar'] #notistack-snackbar\\\").should(\\\"not.contain\\\", \\\"Unable to render\\\");\\n }\\n}); // modal opens\\ncy.get(\\\"#deploy-design-btn\\\").click();\\ncy.get('[data-cy=\\\"deploy-btn-modal\\\"]').click();\\ncy.intercept(\\\"/api/pattern/deploy*\\\").as(\\\"patternDeploy\\\");\\ncy.get('[data-cy=\\\"deploy-btn-confirm\\\"]').click();\\ncy.wait(\\\"@patternDeploy\\\").then(() => {\\n // cy.get(\\\"[data-cy='progress-snackbar']\\\").contains(\\\"Deploying design\\\");\\n cy.get(\\\"body\\\").then(body => {\\n if (body.find(\\\"[aria-describedby='notistack-snackbar'] #notistack-snackbar\\\").length > 0) {\\n cy.get(\\\"[aria-describedby='notistack-snackbar'] #notistack-snackbar\\\").should(\\\"not.contain\\\", \\\"Failed\\\");\\n }\\n });\\n}); //Undeploy \\ncy.get('#undeploy-design-btn').click();\\ncy.get('[data-cy=\\\"Undeploy-btn-modal\\\"]').click(); // modal opens\\ncy.intercept(\\\"/api/pattern/deploy*\\\").as(\\\"patternUndeploy\\\");\\ncy.get('[data-cy=\\\"deploy-btn-confirm\\\"]').click();\\ncy.wait(\\\"@patternUndeploy\\\").then(() => {\\n // cy.get(\\\"[data-cy='progress-snackbar']\\\").contains(\\\"Deploying design\\\");\\n cy.get(\\\"body\\\").then(body => {\\n if (body.find(\\\"[aria-describedby='notistack-snackbar'] #notistack-snackbar\\\").length > 0) {\\n cy.get(\\\"[aria-describedby='notistack-snackbar'] #notistack-snackbar\\\").should(\\\"not.contain\\\", \\\"Failed\\\");\\n }\\n });\\n});\",\"err\":{},\"uuid\":\"d54a5b7d-e1ed-482d-b02c-a28fe48892a1\",\"parentUUID\":\"c2eebbef-f690-4273-a628-63ce06df662e\",\"isHook\":false,\"skipped\":true}],\"suites\":[],\"passes\":[],\"failures\":[\"ebba4945-707f-4b30-a1e2-ef66ef8a3cee\"],\"pending\":[],\"skipped\":[\"1d8cc2fa-0984-49e7-8bc1-1996c6f7fcee\",\"3a712a5a-0661-4035-bada-a4b133aad6c5\",\"e444a863-207a-4bc6-aad6-5c753f16d68d\",\"d54a5b7d-e1ed-482d-b02c-a28fe48892a1\"],\"duration\":263,\"root\":false,\"rootEmpty\":false,\"_timeout\":2000}],\"passes\":[],\"failures\":[],\"pending\":[],\"skipped\":[],\"duration\":0,\"root\":true,\"rootEmpty\":true,\"_timeout\":2000}],\"meta\":{\"mocha\":{\"version\":\"7.0.1\"},\"mochawesome\":{\"options\":{\"quiet\":false,\"reportFilename\":\"mochawesome\",\"saveHtml\":false,\"saveJson\":true,\"consoleReporter\":\"spec\",\"useInlineDiffs\":false,\"code\":true},\"version\":\"7.1.3\"},\"marge\":{\"options\":{\"reportDir\":\"cypress/results\",\"overwrite\":false,\"html\":false,\"json\":true},\"version\":\"6.2.0\"}}}"