Skip to content

Commit

Permalink
test(e2e): fix most arrowMarkerAbsolute tests
Browse files Browse the repository at this point in the history
The arrows between flowcharts do not have the class edgePath.

Instead, I'm loading all `<path>`s within the `<g class='edgePaths'>`
  • Loading branch information
aloisklink committed Sep 14, 2022
1 parent a25c9a3 commit 6e7037b
Showing 1 changed file with 35 additions and 25 deletions.
60 changes: 35 additions & 25 deletions cypress/integration/other/configuration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ describe('Configuration', () => {

// Check the marker-end property to make sure it is properly set to
// start with #
cy.get('.edgePath path')
.first()
.should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(#');
cy.get('.edgePaths').within(() => {
cy.get('path')
.first()
.should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(#');
});
});
it('should handle default value false of arrowMarkerAbsolute', () => {
renderGraph(
Expand All @@ -35,11 +37,13 @@ describe('Configuration', () => {

// Check the marker-end property to make sure it is properly set to
// start with #
cy.get('.edgePath path')
.first()
.should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(#');
cy.get('.edgePaths').within(() => {
cy.get('path')
.first()
.should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(#');
});
});
it('should handle arrowMarkerAbsolute explicitly set to false', () => {
renderGraph(
Expand All @@ -57,11 +61,13 @@ describe('Configuration', () => {

// Check the marker-end property to make sure it is properly set to
// start with #
cy.get('.edgePath path')
.first()
.should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(#');
cy.get('.edgePaths').within(() => {
cy.get('path')
.first()
.should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(#');
});
});
it('should handle arrowMarkerAbsolute explicitly set to "false" as false', () => {
renderGraph(
Expand All @@ -79,11 +85,13 @@ describe('Configuration', () => {

// Check the marker-end property to make sure it is properly set to
// start with #
cy.get('.edgePath path')
.first()
.should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(#');
cy.get('.edgePaths').within(() => {
cy.get('path')
.first()
.should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(#');
});
});
it('should handle arrowMarkerAbsolute set to true', () => {
renderGraph(
Expand All @@ -99,11 +107,13 @@ describe('Configuration', () => {
}
);

cy.get('.edgePath path')
.first()
.should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(http://localhost');
cy.get('.edgePaths').within(() => {
cy.get('path')
.first()
.should('have.attr', 'marker-end')
.should('exist')
.and('include', 'url(http://localhost');
});
});
it('should not taint the initial configuration when using multiple directives', () => {
const url = 'http://localhost:9000/regression/issue-1874.html';
Expand Down

0 comments on commit 6e7037b

Please sign in to comment.