mirror of
https://github.com/knadh/listmonk.git
synced 2025-10-06 21:36:54 +08:00
Fix broken Cypress UI tests.
This commit is contained in:
parent
4cb5eb782f
commit
02c1408f5c
3 changed files with 10 additions and 2 deletions
4
frontend/cypress.json
vendored
4
frontend/cypress.json
vendored
|
@ -5,5 +5,7 @@
|
||||||
"serverInitCmd": "pkill -9 listmonk | cd ../ && ./listmonk --install --yes && ./listmonk > /dev/null 2>/dev/null &",
|
"serverInitCmd": "pkill -9 listmonk | cd ../ && ./listmonk --install --yes && ./listmonk > /dev/null 2>/dev/null &",
|
||||||
"username": "listmonk",
|
"username": "listmonk",
|
||||||
"password": "listmonk"
|
"password": "listmonk"
|
||||||
}
|
},
|
||||||
|
"viewportWidth": 1300,
|
||||||
|
"viewportHeight": 950
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,6 +108,9 @@ describe('Campaigns', () => {
|
||||||
cy.get('button[data-cy=btn-preview]').click();
|
cy.get('button[data-cy=btn-preview]').click();
|
||||||
cy.wait(200);
|
cy.wait(200);
|
||||||
cy.get("#iframe").then(($f) => {
|
cy.get("#iframe").then(($f) => {
|
||||||
|
if (c === 'plain') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const doc = $f.contents();
|
const doc = $f.contents();
|
||||||
expect(doc.find('.wrap').text().trim().replace(/(\s|\n)+/, ' ')).equal(plainBody);
|
expect(doc.find('.wrap').text().trim().replace(/(\s|\n)+/, ' ')).equal(plainBody);
|
||||||
});
|
});
|
||||||
|
@ -216,6 +219,9 @@ describe('Campaigns', () => {
|
||||||
cy.get('button[data-cy=btn-preview]').click();
|
cy.get('button[data-cy=btn-preview]').click();
|
||||||
cy.wait(200);
|
cy.wait(200);
|
||||||
cy.get("#iframe").then(($f) => {
|
cy.get("#iframe").then(($f) => {
|
||||||
|
if (c === 'plain') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const doc = $f.contents();
|
const doc = $f.contents();
|
||||||
expect(doc.find('.wrap').text().trim()).equal(plainBody);
|
expect(doc.find('.wrap').text().trim()).equal(plainBody);
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,7 +13,7 @@ describe('Dashboard', () => {
|
||||||
|
|
||||||
// Campaign counts.
|
// Campaign counts.
|
||||||
cy.get('[data-cy=campaigns] .title').contains('1');
|
cy.get('[data-cy=campaigns] .title').contains('1');
|
||||||
cy.get('[data-cy=campaigns]').contains('1 draft');
|
cy.get('[data-cy=campaigns-draft]').contains('1');
|
||||||
|
|
||||||
// Subscriber counts.
|
// Subscriber counts.
|
||||||
cy.get('[data-cy=subscribers] .title').contains('2');
|
cy.get('[data-cy=subscribers] .title').contains('2');
|
||||||
|
|
Loading…
Add table
Reference in a new issue