mirror of
https://github.com/knadh/listmonk.git
synced 2025-03-01 08:45:28 +08:00
Fix Cypress admin form test to support <codeflask> rendered HTML.
This commit is contained in:
parent
25cdb7b18e
commit
87db0d596b
1 changed files with 3 additions and 2 deletions
|
@ -12,7 +12,7 @@ describe('Forms', () => {
|
||||||
.its('length')
|
.its('length')
|
||||||
.should('eq', 1);
|
.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', () => {
|
it('Selects public list', () => {
|
||||||
|
@ -20,7 +20,7 @@ describe('Forms', () => {
|
||||||
cy.get('ul[data-cy=lists] .checkbox').click();
|
cy.get('ul[data-cy=lists] .checkbox').click();
|
||||||
|
|
||||||
// Make sure the <pre> form HTML has appeared.
|
// 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.
|
// Check that the ID of the list in the checkbox appears in the HTML.
|
||||||
cy.get('ul[data-cy=lists] input').then(($inp) => {
|
cy.get('ul[data-cy=lists] input').then(($inp) => {
|
||||||
cy.wrap($pre).contains($inp.val());
|
cy.wrap($pre).contains($inp.val());
|
||||||
|
@ -111,6 +111,7 @@ describe('Forms', () => {
|
||||||
cy.request('GET', `${apiUrl}/api/campaigns`).then((response) => {
|
cy.request('GET', `${apiUrl}/api/campaigns`).then((response) => {
|
||||||
const campUUID = response.body.data.results[0].uuid;
|
const campUUID = response.body.data.results[0].uuid;
|
||||||
cy.loginAndVisit(`${apiUrl}/subscription/${campUUID}/${subUUID}?manage=1`);
|
cy.loginAndVisit(`${apiUrl}/subscription/${campUUID}/${subUUID}?manage=1`);
|
||||||
|
cy.get('a').contains('Manage').click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue