Skip to content

Commit 01519dc

Browse files
committed
chore: code coverage in the job summary
Signed-off-by: Vladimir Zaikin <friend.zva@yandex.ru>
1 parent 2cfb151 commit 01519dc

2 files changed

Lines changed: 17 additions & 6 deletions

File tree

.github/workflows/INflow.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,15 @@ jobs:
5050
- uses: ./.github/actions/setup-node
5151

5252
- name: Run Cypress
53-
uses: cypress-io/github-action@v6
53+
uses: cypress-io/github-action@v6.10.0
5454
with:
5555
working-directory: ./INflow
56-
build: npm run build
5756
start: npm run dev
5857
wait-on: 'http://localhost:5173'
5958

6059
- name: Get coverage
6160
working-directory: ./INflow
62-
run: npx nyc report && npx nyc report --reporter=text-summary
61+
run: |
62+
npx nyc report
63+
echo '## Coverage' >> $GITHUB_STEP_SUMMARY
64+
npx nyc report --reporter=text-summary >> $GITHUB_STEP_SUMMARY

INflow/cypress/e2e/dynamics.cy.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,22 @@ describe('INflow E2E Tests: dynamics modes', () => {
2929
cy.get('body > input[type="file"]').selectFile(pathsFullFile);
3030
});
3131

32-
cy.get('.react-flow[id=1] .react-flow__nodes').children().should('have.length', 9);
33-
cy.get('.react-flow[id=0] .react-flow__nodes').children().should('have.length', 9);
32+
cy.get('.react-flow[id="0"]').should('have.attr', 'data-testmode').and('equal', '2');
33+
34+
cy.then(() => {
35+
cy.get('.react-flow[id=1] .react-flow__nodes')
36+
.children()
37+
.should('be.visible')
38+
.and('have.length', 9);
39+
cy.get('.react-flow[id=0] .react-flow__nodes')
40+
.children()
41+
.should('be.visible')
42+
.and('have.length', 9);
43+
});
3444
});
3545

3646
describe('Comparison', () => {
3747
it('should upload nets and set comparison mode', () => {
38-
cy.get('.react-flow[id="0"]').should('have.attr', 'data-testmode').and('equal', '2');
3948
cy.get('[data-testid="MenuInfo"]').should('contain', namesFile[0]);
4049
cy.get('[data-testid="MenuControl"]').within(() => {
4150
cy.get('[data-testid="edit-net"]').should('exist').should('not.be.disabled');

0 commit comments

Comments
 (0)