chore: Update test URL

This commit is contained in:
Sidharth Vinod
2022-10-05 16:04:26 +08:00
parent 42b59a9e35
commit f9753fc621
6 changed files with 49 additions and 39 deletions

View File

@@ -23,14 +23,14 @@ describe('Interaction', () => {
// When there is a URL, cy.contains selects the a tag instead of the span. The .node is a child of a, so we have to use find instead of parent.
cy.contains('URLTest1').find('.node').click();
cy.location().should(({ href }) => {
expect(href).to.eq('http://localhost:9000/webpackUsage.html');
expect(href).to.eq('http://localhost:9000/empty.html');
});
});
it('Graph: should handle a click on a node with a bound url where the node starts with a number', () => {
cy.contains('2URL').find('.node').click();
cy.location().should(({ href }) => {
expect(href).to.eq('http://localhost:9000/webpackUsage.html');
expect(href).to.eq('http://localhost:9000/empty.html');
});
});
@@ -47,28 +47,28 @@ describe('Interaction', () => {
it('Flowchart-v2: should handle a click on a node with a bound url', () => {
cy.contains('URLTest2').find('.node').click();
cy.location().should(({ href }) => {
expect(href).to.eq('http://localhost:9000/webpackUsage.html');
expect(href).to.eq('http://localhost:9000/empty.html');
});
});
it('Flowchart-v2: should handle a click on a node with a bound url where the node starts with a number', () => {
cy.contains('20URL').find('.node').click();
cy.location().should(({ href }) => {
expect(href).to.eq('http://localhost:9000/webpackUsage.html');
expect(href).to.eq('http://localhost:9000/empty.html');
});
});
it('should handle a click on a task with a bound URL clicking on the rect', () => {
cy.get('rect#cl1').click({ force: true });
cy.location().should(({ href }) => {
expect(href).to.eq('http://localhost:9000/webpackUsage.html');
expect(href).to.eq('http://localhost:9000/empty.html');
});
});
it('should handle a click on a task with a bound URL clicking on the text', () => {
cy.get('text#cl1-text').click({ force: true });
cy.location().should(({ href }) => {
expect(href).to.eq('http://localhost:9000/webpackUsage.html');
expect(href).to.eq('http://localhost:9000/empty.html');
});
});
@@ -110,28 +110,28 @@ describe('Interaction', () => {
it('should handle a click on a node with a bound url', () => {
cy.contains('URL1').find('.node').click();
cy.location().should(({ href }) => {
expect(href).to.eq('http://localhost:9000/webpackUsage.html');
expect(href).to.eq('http://localhost:9000/empty.html');
});
});
it('should handle a click on a node with a bound url where the node starts with a number', () => {
cy.contains('2URL').find('.node').click();
cy.location().should(({ href }) => {
expect(href).to.eq('http://localhost:9000/webpackUsage.html');
expect(href).to.eq('http://localhost:9000/empty.html');
});
});
it('should handle a click on a task with a bound URL clicking on the rect', () => {
cy.get('rect#cl1').click({ force: true });
cy.location().should(({ href }) => {
expect(href).to.eq('http://localhost:9000/webpackUsage.html');
expect(href).to.eq('http://localhost:9000/empty.html');
});
});
it('should handle a click on a task with a bound URL clicking on the text', () => {
cy.get('text#cl1-text').click({ force: true });
cy.location().should(({ href }) => {
expect(href).to.eq('http://localhost:9000/webpackUsage.html');
expect(href).to.eq('http://localhost:9000/empty.html');
});
});
@@ -164,7 +164,7 @@ describe('Interaction', () => {
it('should handle a click on a node with a bound url', () => {
cy.contains('URL1').find('.node').click();
cy.location().should(({ href }) => {
expect(href).to.eq('http://localhost:9000/webpackUsage.html');
expect(href).to.eq('http://localhost:9000/empty.html');
});
});