Fix tests

This commit is contained in:
Sidharth Vinod
2021-07-30 14:55:28 +05:30
parent 6becf69630
commit 81589e5d98
4 changed files with 9 additions and 8 deletions
+3 -2
View File
@@ -34,7 +34,7 @@ describe('Site Loads', () => {
it('should prevent setting the "securityLevel" option via URL', () => {
const b64State = toBase64(
`{"code":"graph TD\\nA[\\"<img src='https://via.placeholder.com/64' width=64/>\\"]","mermaid":"{\\"securityLevel\\": \\"loose\\", \\"theme\\": \\"forest\\"}","updateEditor":true,"autoSync":true,"updateDiagram":true}`,
`{"code":"graph TD\\nA[\\"<img src='https://via.placeholder.com/64' width=64 />\\"]","mermaid":"{\\"securityLevel\\": \\"loose\\", \\"theme\\": \\"forest\\"}","updateEditor":true,"autoSync":true,"updateDiagram":true}`,
true
);
cy.on('window:confirm', () => true);
@@ -43,7 +43,8 @@ describe('Site Loads', () => {
cy.contains('forest');
cy.contains('securityLevel').should('not.exist');
cy.get('#view').find('img').should('not.exist');
cy.get('#view').contains('<img src');
cy.get('#view').contains('<img');
cy.get('#view').contains('src="https://via.placeholder.com/64"');
});
it('should allow persisting "securityLevel" using confirm dialogue', () => {
+1 -1
View File
@@ -7,7 +7,7 @@ module.exports = {
"1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"updateEditor\":false,\"autoSync\":true,\"updateDiagram\":false}"
}
},
"__version": "8.0.0",
"__version": "8.1.0",
"Auto sync tests": {
"should dim diagram when code is edited": {
"1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\\n C --> Test\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"updateEditor\":false,\"autoSync\":false,\"updateDiagram\":false}"
+1 -1
View File
@@ -23,7 +23,7 @@
"autoprefixer": "^10.3.1",
"chai": "^4.3.4",
"cssnano": "^5.0.7",
"cypress": "8.0.0",
"cypress": "8.1.0",
"cypress-localstorage-commands": "^1.5.0",
"eslint": "^7.30.0",
"eslint-config-prettier": "^8.1.0",
+4 -4
View File
@@ -1745,10 +1745,10 @@ cypress-localstorage-commands@^1.5.0:
resolved "https://registry.yarnpkg.com/cypress-localstorage-commands/-/cypress-localstorage-commands-1.5.0.tgz#53d67c1ce491dcbe39794151749b943227e65cd7"
integrity sha512-gl1uKeviYdyJG4dLcZ9hfoUjLciwkkfbaQ3gvRtmipsPxC612ZBJhSjbunnJcUGwkryaM+82VrY9ij0tLSg7LA==
cypress@8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-8.0.0.tgz#bd68f4cff9ffb0c1176e9dd87d020cbdd0001ab8"
integrity sha512-Hhbc7FtbeCSg5Ui2zxXQLynk7IYGIygG8NqTauS4EtCWyp2k6s4g8P4KUZXwRbhuryN/+/dCd1kPtFbhBx8MuQ==
cypress@8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-8.1.0.tgz#9aaed7fb2a4d1876528b72d437f97bc824db0735"
integrity sha512-GXjlqPjY/6HPbQwAp3AvlA1Mk/NoJTAmqVSUhQsuM/1xDpd/FQHkxVuq5h6O6RrAoCXSgpZPXFsVtdqE+FwEJw==
dependencies:
"@cypress/request" "^2.88.5"
"@cypress/xvfb" "^1.2.4"