Skip to content

Commit

Permalink
Updated the integration test selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishjain0512 committed Aug 4, 2022
1 parent e6b410a commit 0ab152d
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions cypress/integration/other/interaction.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@ describe('Interaction', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body').find('g#flowchart-Function-2').click();
cy.get('body').find('g#flowchart-Function-4').click();

cy.get('.created-by-click').should('have.text', 'Clicked By Flow');
});
it('Graph: should handle a click on a node with a bound function with args', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body').find('g#flowchart-FunctionArg-18').click();
cy.get('body').find('g#flowchart-FunctionArg-28').click();

cy.get('.created-by-click-2').should('have.text', 'Clicked By Flow: ARGUMENT');
});
it('Flowchart: 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_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body').find('g[id="flowchart-FunctionArg-22"]').click();
cy.get('body').find('g[id="flowchart-FunctionArg-34"]').click();

cy.get('.created-by-click-2').should('have.text', 'Clicked By Flow: ARGUMENT');
});
it('Graph: should handle a click on a node with a bound url', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body').find('#flowchart-URL-3').click();
cy.get('body').find('#flowchart-URL-5').click();

cy.location().should((location) => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
Expand All @@ -38,7 +38,7 @@ describe('Interaction', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body').find('g[id="flowchart-2URL-7"]').click();
cy.get('body').find('g[id="flowchart-2URL-11"]').click();

cy.location().should((location) => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
Expand All @@ -49,23 +49,23 @@ describe('Interaction', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body').find('g#flowchart-Function-10').click();
cy.get('body').find('g#flowchart-Function-16').click();

cy.get('.created-by-click').should('have.text', 'Clicked By Flow');
});
it('Flowchart-v2: 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_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body').find('g[id="flowchart-1Function-14"]').click();
cy.get('body').find('g[id="flowchart-1Function-22"]').click();

cy.get('.created-by-click').should('have.text', 'Clicked By Flow');
});
it('Flowchart-v2: should handle a click on a node with a bound url', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body').find('#flowchart-URL-11').click();
cy.get('body').find('#flowchart-URL-17').click();

cy.location().should((location) => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
Expand All @@ -75,7 +75,7 @@ describe('Interaction', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body').find('g[id="flowchart-2URL-15"]').click();
cy.get('body').find('g[id="flowchart-2URL-23"]').click();

cy.location().should((location) => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
Expand Down Expand Up @@ -142,7 +142,7 @@ describe('Interaction', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body').find('g#flowchart-Function-2').click();
cy.get('body').find('g#flowchart-Function-4').click();

cy.get('.created-by-click').should('not.exist');
// cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
Expand All @@ -151,7 +151,7 @@ describe('Interaction', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body').find('g[id="flowchart-1Function-6"]').click();
cy.get('body').find('g[id="flowchart-1Function-10"]').click();

// cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
cy.get('.created-by-click').should('not.exist');
Expand All @@ -160,7 +160,7 @@ describe('Interaction', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body').find('g#flowchart-URL-3').click();
cy.get('body').find('g#flowchart-URL-5').click();

cy.location().should((location) => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
Expand All @@ -170,7 +170,7 @@ describe('Interaction', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body').find('g[id="flowchart-2URL-7"]').click();
cy.get('body').find('g[id="flowchart-2URL-11"]').click();

cy.location().should((location) => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
Expand Down

0 comments on commit 0ab152d

Please sign in to comment.