FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Coverage for Cypress tests by jenny-s51 · Pull Request #3295 · patternfly/patternfly-react · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .js  (2) .json  (3) .lock  (1) .sh  (1) .ts  (46) .yml  (1) dotfile  (1) All 7 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
45 changes: 36 additions & 9 deletions .circleci/config.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ references:
- packages/react-icons/dist/
js_deps_cache_key: &js_deps_cache_key
js-deps-v{{.Environment.CACHE_VERSION}}-{{checksum "yarn.lock"}}
cypress_cache_key: &cypress_cache_key
cypress-v{{.Environment.CACHE_VERSION}}-{{checksum "yarn.lock"}}
build_cache_key: &build_cache_key
build-cache-v{{.Environment.CACHE_VERSION}}-{{checksum "yarn.lock"}}
doc_build_cache_key: &doc_build_cache_key
Expand Down Expand Up @@ -93,9 +95,12 @@ workflows:
- test_a11y_pf4:
requires:
- build_pf4_docs
- build_integration:
- test_integration:
requires:
- build
filters:
branches:
only: master
- lint:
requires:
- build
Expand Down Expand Up @@ -131,6 +136,10 @@ jobs:
- save_cache:
paths: *js_deps_paths
key: *js_deps_cache_key
- save_cache:
paths:
- ~/.cache/Cypress
key: *cypress_cache_key
- restore_cache:
keys:
- *build_cache_key
Expand Down Expand Up @@ -171,17 +180,39 @@ jobs:
- run:
name: Other Tests
command: yarn test:misc --maxWorkers=2 && yarn run codecov -F misc
build_integration:
test_integration:
docker:
- image: circleci/node:10
steps:
- *attach_workspace
- restore_cache:
keys:
- *js_deps_cache_key
- restore_cache:
keys:
- *cypress_cache_key
- run:
name: Install Cypress deps
command: sudo apt-get install libnss3 libgtk-3-0 libxss1 libasound2
- run:
name: ls ~/.cache/Cypress
command: ls ~/.cache/Cypress
- run:
Comment thread
jenny-s51 marked this conversation as resolved.
name: Build Cypress Integration Tests
command: yarn build:integration
- run:
name: Run Cypress Integration Tests
command: yarn test:ci && yarn run codecov -f packages/patternfly-4/react-integration/results/merged-test-results.xml -F patternfly4integration
no_output_timeout: 180m
- run:
name: Create HTML file of Cypress coverage
command: yarn build:integration:report
- persist_to_workspace:
root: ~/project
paths:
- packages/patternfly-4/react-integration/results
Comment thread
jenny-s51 marked this conversation as resolved.
- store_artifacts:
path: /tmp/artifacts
lint:
docker:
- image: circleci/node:10
Expand All @@ -193,9 +224,6 @@ jobs:
- run:
name: TSLint
command: yarn lint:ts || true
- run:
name: MarkdownLint
command: yarn lint:md
- run:
name: "@patternfly/patternfly Versions Match"
command: yarn lint:versions
Expand Down Expand Up @@ -245,10 +273,6 @@ jobs:
- save_cache:
paths: *doc_build_cache_paths
key: *doc_build_cache_key
- persist_to_workspace:
root: ~/project
paths:
- packages/patternfly-4/react-docs/public/
test_a11y_pf4:
docker:
- image: circleci/node:10-browsers
Expand All @@ -270,6 +294,9 @@ jobs:
- image: circleci/node:10
steps:
- *attach_workspace
- restore_cache:
keys:
- *doc_build_cache_key
- run:
name: Copy to docs folder
command: .circleci/copy-docs.sh
Expand Down
1 change: 1 addition & 0 deletions .circleci/copy-docs.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ mkdir -p docs
cp -r .out docs/patternfly-3
cp -r packages/patternfly-4/react-docs/public docs/patternfly-4
cp .circleci/index.html docs/index.html
cp -r packages/patternfly-4/react-integration/results/test-html-report.html docs/patternfly-4
# These need to be at the root for CSS variables
cp -r docs/patternfly-4/assets docs/assets
# Use newer favicon
Expand Down
6 changes: 5 additions & 1 deletion package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"eslint-plugin-react": "^7.17.0",
"fs-extra": "^6.0.1",
"glob": "^7.1.2",
"http-get": "^0.5.10",
"jest": "24.1.0",
"jest-cli": "24.1.0",
"lerna": "3.16.2",
Expand All @@ -70,6 +71,7 @@
"react-dom": "^16.4.0",
"sass-loader": "^6.0.6",
"shx": "^0.3.2",
"start-server-and-test": "^1.10.7",
"style-loader": "^0.20.3",
"stylelint": "^9.10.1",
"stylelint-config-standard": "^18.2.0",
Expand All @@ -86,6 +88,7 @@
"build:pf4": "yarn build pf4",
"build:docs": "lerna run build:docs --stream",
"build:storybook": "build-storybook -c storybook -o .out",
"build:integration:report": "lerna run build:integration:report --stream",
"build:integration": "lerna run build:demo-app --stream",
"clean": "yarn clean:build && lerna run clean --parallel",
"clean:build": "shx rm -rf .cache",
Expand All @@ -105,7 +108,8 @@
"test": "jest packages",
"test:a11y": "lerna run test:a11y:ci --stream",
"test:current": "jest --watch",
"test:integration": "lerna run test:integration",
"test:ci": "start-server-and-test start:demo-app http-get://localhost:3000 test:integration",
"test:integration": "lerna run test:integration --stream",
"test:misc": "jest packages/react-*",
"test:pf3": "jest packages/patternfly-3",
"test:pf4": "jest packages/patternfly-4",
Expand Down
3 changes: 3 additions & 0 deletions packages/patternfly-4/react-integration/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
cypress/videos
cypress/screenshots
cypress/coverage

results
11 changes: 9 additions & 2 deletions packages/patternfly-4/react-integration/cypress.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"chromeWebSecurity": false
}
"chromeWebSecurity": false,
"video": false,
"waitForAnimations": false,
"reporter": "junit",
"reporterOptions": {
"mochaFile": "results/my-test-output-[hash].xml",
"toConsole": true
}
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ describe('Area Chart Color Demo Test', () => {
});

it('Verify area chart', () => {
cy.get('.VictoryContainer').should('exist');
cy.get('.pf-c-chart').should('exist');
});

it('Verify legend string', () => {
cy.get('text').contains('Cats');
});

it('Verify svg width and height', () => {
cy.get('.VictoryContainer > svg').should('have.attr', 'width', '650');
cy.get('.VictoryContainer > svg').should('have.attr', 'height', '225');
cy.get('.pf-c-chart > svg').should('have.attr', 'width', '650');
cy.get('.pf-c-chart > svg').should('have.attr', 'height', '225');
});
});
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ describe('Area Chart Simple Demo Test', () => {
});

it('Verify area chart', () => {
cy.get('.VictoryContainer').should('exist');
cy.get('.pf-c-chart').should('exist');
});

it('Verify legend string', () => {
cy.get('text').contains('CPU');
});

it('Verify svg width and height', () => {
cy.get('.VictoryContainer > svg').should('have.attr', 'width', '400');
cy.get('.VictoryContainer > svg').should('have.attr', 'height', '100');
cy.get('.pf-c-chart > svg').should('have.attr', 'width', '400');
cy.get('.pf-c-chart > svg').should('have.attr', 'height', '100');
});
});
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ describe('Area Chart Stacked Demo Test', () => {
});

it('Verify area chart', () => {
cy.get('.VictoryContainer').should('exist');
cy.get('.pf-c-chart').should('exist');
});

it('Verify legend string', () => {
cy.get('text').contains('Cats');
});

it('Verify svg width and height', () => {
cy.get('.VictoryContainer > svg').should('have.attr', 'width', '650');
cy.get('.VictoryContainer > svg').should('have.attr', 'height', '225');
cy.get('.pf-c-chart > svg').should('have.attr', 'width', '650');
cy.get('.pf-c-chart > svg').should('have.attr', 'height', '225');
});
});
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ describe('Bar Chart Multicolor with Zoom Demo Test', () => {
});

it('Verify bar chart', () => {
cy.get('.VictoryContainer').should('exist');
cy.get('.pf-c-chart').should('exist');
});

it('Verify legend string', () => {
cy.get('text').contains('Cats');
});

it('Verify svg width and height', () => {
cy.get('.VictoryContainer > svg').should('have.attr', 'width', '450');
cy.get('.VictoryContainer > svg').should('have.attr', 'height', '300');
cy.get('.pf-c-chart > svg').should('have.attr', 'width', '450');
cy.get('.pf-c-chart > svg').should('have.attr', 'height', '400');
});
});
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ describe('Bar Chart Blue Demo Test', () => {
});

it('Verify bar chart', () => {
cy.get('.VictoryContainer').should('exist');
cy.get('.pf-c-chart').should('exist');
});

it('Verify legend string', () => {
cy.get('text').contains('Cats');
});

it('Verify svg width and height', () => {
cy.get('.VictoryContainer > svg').should('have.attr', 'width', '600');
cy.get('.VictoryContainer > svg').should('have.attr', 'height', '250');
cy.get('.pf-c-chart > svg').should('have.attr', 'width', '600');
cy.get('.pf-c-chart > svg').should('have.attr', 'height', '250');
});
});
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ describe('Bar Chart Simple Demo Test', () => {
});

it('Verify bar chart', () => {
cy.get('.VictoryContainer').should('exist');
cy.get('.pf-c-chart').should('exist');
});

it('Verify legend string', () => {
cy.get('text').contains('Cats');
});

it('Verify svg width and height', () => {
cy.get('.VictoryContainer > svg').should('have.attr', 'width', '600');
cy.get('.VictoryContainer > svg').should('have.attr', 'height', '250');
cy.get('.pf-c-chart > svg').should('have.attr', 'width', '600');
cy.get('.pf-c-chart > svg').should('have.attr', 'height', '250');
});
});
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ describe('Button Demo Test', () => {
cy.get('.pf-m-tertiary').should('be.disabled');
});

it('Link button should be set to tabindex=-1', () => {
cy.get('.pf-m-link').should('have.attr', 'tabindex', '-1');
});

// do this last since it leaves the page
it('Verify primary button clicks', () => {
cy.get('button.pf-m-primary').click();
cy.url().should('not.eq', 'http://localhost:3000/button-demo-nav-link');
});

it('Link button should be set to tabindex=-1', () => {
cy.get('.pf-m-link').should('have.attr', 'tabindex', '-1');
});
});
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('Chip Group Demo Test', () => {
.contains('Lemons');
});

it('Verify chip is closed on default', () => {
xit('Verify chip is closed on default', () => {
cy.get('.pf-c-chip__text')
.eq(1)
.should('not.contain', 'Limes');
Expand All @@ -26,14 +26,14 @@ describe('Chip Group Demo Test', () => {
.should('not.equal', null);
});

it('Verify more button works', () => {
xit('Verify more button works', () => {
cy.get('.pf-m-overflow')
.children('button')
.click();
cy.get('.pf-c-chip__text').contains('Show Less');
});

it('Verify show less button works', () => {
xit('Verify show less button works', () => {
cy.get('.pf-m-overflow')
.children('button')
.click();
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ describe('Chip Group Demo Test', () => {
.should('not.equal', null);
});

it('Verify show less button works', () => {
xit('Verify show less button works', () => {
cy.get('.pf-m-overflow')
.children('button')
.click();
cy.get('.pf-c-chip__text').contains('more');
});

it('Verify more button works', () => {
xit('Verify more button works', () => {
cy.get('.pf-m-overflow')
.children('button')
.click();
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('Data Toolbar Demo Test', () => {
cy.get('#demo-toggle-group .pf-c-data-toolbar__toggle').should('be.visible');
});

it('Verify expandable content expanded', () => {
xit('Verify expandable content expanded', () => {
cy.get('#demo-toggle-group .pf-c-data-toolbar__toggle button')
.last()
.click();
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ describe('Donut Chart with Bottom Legend Demo Test', () => {
});

it('Verify donut chart', () => {
cy.get('.VictoryContainer').should('exist');
cy.get('.pf-c-chart').should('exist');
});

it('Verify legend string', () => {
cy.get('text').contains('Pets');
});

it('Verify svg width and height', () => {
cy.get('.VictoryContainer > svg').should('have.attr', 'width', '300');
cy.get('.VictoryContainer > svg').should('have.attr', 'height', '275');
cy.get('.pf-c-chart > svg').should('have.attr', 'width', '300');
cy.get('.pf-c-chart > svg').should('have.attr', 'height', '275');
});
});
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ describe('Donut Chart Color with Right Legend Demo Test', () => {
});

it('Verify donut chart', () => {
cy.get('.VictoryContainer').should('exist');
cy.get('.pf-c-chart').should('exist');
});

it('Verify legend string', () => {
cy.get('text').contains('Pets');
});

it('Verify svg width and height', () => {
cy.get('.VictoryContainer > svg').should('have.attr', 'width', '350');
cy.get('.VictoryContainer > svg').should('have.attr', 'height', '230');
cy.get('.pf-c-chart > svg').should('have.attr', 'width', '350');
cy.get('.pf-c-chart > svg').should('have.attr', 'height', '230');
});
});
Loading

Back | FazBrowse Home | New Git URL