2022-01-25 17:57:29 -03:00
|
|
|
context('Relationship Topics', () => {
|
2022-07-12 18:58:11 -07:00
|
|
|
beforeEach(() => {
|
2022-11-30 22:12:40 -08:00
|
|
|
// Remove storage for autosave ...
|
2022-07-12 18:58:11 -07:00
|
|
|
cy.visit('/editor.html');
|
2022-11-30 22:12:40 -08:00
|
|
|
cy.clearLocalStorage('welcome-xml');
|
2022-07-12 18:58:11 -07:00
|
|
|
cy.reload();
|
2022-11-30 22:12:40 -08:00
|
|
|
|
|
|
|
// Wait for load complate ...
|
|
|
|
cy.get('svg > path').should('be.visible');
|
2022-07-12 18:58:11 -07:00
|
|
|
});
|
2022-01-25 17:57:29 -03:00
|
|
|
|
2022-10-31 08:32:51 -07:00
|
|
|
it('Add Relationship', () => {
|
2022-11-30 22:12:40 -08:00
|
|
|
cy.contains('Features').click();
|
2022-10-31 17:49:16 -07:00
|
|
|
cy.get(`[aria-label="Add Relationship"]`).first().click();
|
2022-11-30 22:12:40 -08:00
|
|
|
cy.contains('Try it Now!').click();
|
2022-11-30 22:06:21 -08:00
|
|
|
|
2022-11-30 22:12:40 -08:00
|
|
|
cy.get('[test-id="11-15-relationship"]').click();
|
2022-11-16 21:12:33 -08:00
|
|
|
cy.get('[test-id="11-15-relationship"]').should('exist');
|
|
|
|
|
2022-10-31 08:32:51 -07:00
|
|
|
cy.matchImageSnapshot('addRelationship');
|
|
|
|
});
|
|
|
|
|
2022-11-30 22:12:40 -08:00
|
|
|
it('Delete Relationship', () => {
|
2022-11-16 21:12:33 -08:00
|
|
|
cy.contains('Features').first().click();
|
|
|
|
cy.get(`[aria-label="Add Relationship"]`).first().click();
|
|
|
|
cy.contains('Try it Now!').first().click();
|
|
|
|
|
2022-11-30 22:12:40 -08:00
|
|
|
cy.get('[test-id="11-15-relationship"]').should('exist');
|
2022-11-30 22:06:21 -08:00
|
|
|
cy.get('[test-id="11-15-relationship"]').click();
|
2022-11-30 22:12:40 -08:00
|
|
|
|
2022-10-31 08:32:51 -07:00
|
|
|
cy.get('body').type('{backspace}');
|
2022-01-25 17:57:29 -03:00
|
|
|
|
2022-11-30 22:12:40 -08:00
|
|
|
cy.get('[test-id="11-15-relationship"]').should('not.exist');
|
2022-10-31 08:32:51 -07:00
|
|
|
cy.matchImageSnapshot('delete relationship');
|
2022-07-12 18:58:11 -07:00
|
|
|
});
|
2022-01-25 17:57:29 -03:00
|
|
|
});
|