Skip to content

Commit

Permalink
mermaid-js#2177 Updating cypress and percy
Browse files Browse the repository at this point in the history
  • Loading branch information
knsv committed Jul 7, 2021
1 parent 6715498 commit 7fcb1ae
Show file tree
Hide file tree
Showing 30 changed files with 2,725 additions and 1,265 deletions.
3 changes: 3 additions & 0 deletions .percy.old.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: 1
snapshot:
widths: [1280]
7 changes: 5 additions & 2 deletions .percy.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
version: 1
version: 2
snapshot:
widths: [1280]
widths:
- 1280
discovery:
disable-cache: true
22 changes: 14 additions & 8 deletions cypress/integration/other/interaction.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ describe('Interaction', () => {
.find('g#flowchart-Function-2')
.click();

cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
cy.get('.created-by-click').should('not.exist');
// cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
});
it('should handle a click on a node with a bound function where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_strict.html';
Expand All @@ -188,7 +189,8 @@ describe('Interaction', () => {
.find('g[id="flowchart-1Function-6"]')
.click();

cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
// cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
cy.get('.created-by-click').should('not.exist');
});
it('should handle a click on a node with a bound url', () => {
const url = 'http://localhost:9000/click_security_strict.html';
Expand Down Expand Up @@ -247,7 +249,8 @@ describe('Interaction', () => {
.find('rect#cl2')
.click({ force: true });

cy.get('.created-by-gant-click').should('not.have.text', 'Clicked By Gant cl2');
// cy.get('.created-by-gant-click').should('not.have.text', 'Clicked By Gant cl2');
cy.get('.created-by-gant-click').should('not.exist')
});
it('should handle a click on a task with a bound function', () => {
const url = 'http://localhost:9000/click_security_strict.html';
Expand All @@ -257,7 +260,8 @@ describe('Interaction', () => {
.find('text#cl2-text')
.click({ force: true });

cy.get('.created-by-gant-click').should('not.have.text', 'Clicked By Gant cl2');
// cy.get('.created-by-gant-click').should('not.have.text', 'Clicked By Gant cl2');
cy.get('.created-by-gant-click').should('not.exist')
});
});

Expand All @@ -270,7 +274,8 @@ describe('Interaction', () => {
.find('g#flowchart-Function-2')
.click();

cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
// cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
cy.get('.created-by-click').should('not.exist');
});
it('should handle a click on a node with a bound function where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_other.html';
Expand All @@ -280,7 +285,8 @@ describe('Interaction', () => {
.find('g[id="flowchart-1Function-6"]')
.click();

cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
cy.get('.created-by-click').should('not.exist');
cy.get('.created-by-click').should('not.exist');
});
it('should handle a click on a node with a bound url', () => {
const url = 'http://localhost:9000/click_security_other.html';
Expand All @@ -303,7 +309,7 @@ describe('Interaction', () => {
.find('rect#cl2')
.click({ force: true });

cy.get('.created-by-gant-click').should('not.have.text', 'Clicked By Gant cl2');
cy.get('.created-by-gant-click').should('not.exist');
});
it('should handle a click on a task with a bound function', () => {
const url = 'http://localhost:9000/click_security_other.html';
Expand All @@ -313,7 +319,7 @@ describe('Interaction', () => {
.find('text#cl2-text')
.click({ force: true });

cy.get('.created-by-gant-click').should('not.have.text', 'Clicked By Gant cl2');
cy.get('.created-by-gant-click').should('not.exist');
});
});
});
2 changes: 1 addition & 1 deletion cypress/integration/other/webpackUsage.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ describe('Sequencediagram', () => {
.find('svg')
.should('have.length', 1);

cy.get('.label > g > foreignobject > div').should('not.contain.text', '<b>');
cy.get('g.label > foreignobject > div').should('not.contain.text', '<b>');
});
});
13 changes: 5 additions & 8 deletions cypress/platform/knsv.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,9 @@

</div>
<div class="mermaid" style="width: 100%; height: 20%;">
stateDiagram-v2
state CompositeState {
state AnotherCompositeState1234567890 {
YourState
}
}
flowchart TD
A("<img scr='https://iconscout.com/ms-icon-310x310.png' />")
B(<b>Bold text!</b>)
</div>
<div class="mermaid2" style="width: 100%; height: 20%;">
stateDiagram-v2
Expand All @@ -81,7 +78,7 @@
}
}
</div>
<div class="mermaid" style="width: 100%; height: 20%;">
<div class="mermaid2" style="width: 100%; height: 20%;">
stateDiagram-v2
[*] --> Active

Expand Down Expand Up @@ -125,7 +122,7 @@
rankSpacing: 50,
defaultRenderer: 'dagre-wrapper',
},

logLevel:0,
fontSize: 18,
curve: 'cardinal',
securityLevel: 'loose',
Expand Down
2 changes: 0 additions & 2 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
// // `config` is the resolved Cypress config
// }

let percyHealthCheck = require("@percy/cypress/task");

module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on("task", percyHealthCheck);
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands'
import './commands';
import '@percy/cypress';

// Alternatively you can use CommonJS syntax:
// require('./commands')
Loading

0 comments on commit 7fcb1ae

Please sign in to comment.