Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Fix Cypress admin form test to support <codeflask> rendered HTML.

Kailash Nadh87db0d596b1c
diff --git a/frontend/cypress/e2e/forms.cy.js b/frontend/cypress/e2e/forms.cy.js
index 14dfbdb2..ce2a2965 100644
--- a/frontend/cypress/e2e/forms.cy.js
+++ b/frontend/cypress/e2e/forms.cy.js
@@ -12,7 +12,7 @@ describe('Forms', () => {
.its('length')
.should('eq', 1);
- cy.get('[data-cy=form] pre').should('not.exist');
+ cy.get('[data-cy=form] code-flask').should('not.exist');
});
it('Selects public list', () => {
@@ -20,7 +20,7 @@ describe('Forms', () => {
cy.get('ul[data-cy=lists] .checkbox').click();
// Make sure the <pre> form HTML has appeared.
- cy.get('[data-cy=form] pre').then(($pre) => {
+ cy.get('code-flask').shadow().find('pre').then(($pre) => {
// Check that the ID of the list in the checkbox appears in the HTML.
cy.get('ul[data-cy=lists] input').then(($inp) => {
cy.wrap($pre).contains($inp.val());
@@ -111,6 +111,7 @@ describe('Forms', () => {
cy.request('GET', `${apiUrl}/api/campaigns`).then((response) => {
const campUUID = response.body.data.results[0].uuid;
cy.loginAndVisit(`${apiUrl}/subscription/${campUUID}/${subUUID}?manage=1`);
+ cy.get('a').contains('Manage').click();
});
});