UNPKG

cypress-plugin-snapshots

Version:
209 lines (180 loc) 4.5 kB
.command-name-toMatchImageSnapshot .command-method span, .command-name-toMatchSnapshot .command-method span { border-radius: 2px; padding: 0 3px; font-size: 11px; display: inline-block; height: 14px; line-height: 16px; } .command-name-toMatchImageSnapshot.command-state-passed .command-method span, .command-name-toMatchSnapshot.command-state-passed .command-method span { background-color: #08c18d; color: white; } .command-name-toMatchImageSnapshot.command-state-failed .command-method span, .command-name-toMatchSnapshot.command-state-failed .command-method span { background-color: #e94f5f; color: white; } .command-name-toMatchImageSnapshot.command-state-pending .command-method span, .command-name-toMatchSnapshot.command-state-pending .command-method span { background-color: #428BCA; color: white; } .command-name-toMatchImageSnapshot.command-state-failed+.command-name-then.command-state-failed, .command-name-toMatchSnapshot.command-state-failed+.command-name-then.command-state-failed { display: none; } a[href^="#cypress-plugin-snapshot-"] { background: #08c18d; border-radius: 2px; color: white; display: inline-block; font-size: 11px; height: 14px; line-height: 16px; margin-top: 1px; padding: 0 3px; text-transform: uppercase; } .command-state-failed a[href^="#cypress-plugin-snapshot-"] { background: #fad7db; border: 1px solid currentColor; color: #e94f5f; } a[href^="#cypress-plugin-snapshot-"]:active, a[href^="#cypress-plugin-snapshot-"]:hover, a[href^="#cypress-plugin-snapshot-"]:focus { color: white; text-decoration: none; background: #08c18d; } .command-state-failed a[href^="#cypress-plugin-snapshot-"]:active, .command-state-failed a[href^="#cypress-plugin-snapshot-"]:hover, .command-state-failed a[href^="#cypress-plugin-snapshot-"]:focus { background-color: #e94f5f; border-color: #e94f5f; } .command-state-pending a[href^="#cypress-plugin-snapshot-"], .command-state-pending a[href^="#cypress-plugin-snapshot-"]:active, .command-state-pending a[href^="#cypress-plugin-snapshot-"]:hover, .command-state-pending a[href^="#cypress-plugin-snapshot-"]:focus { background-color: #428BCA; border-color: #428BCA; } .command-state-failed a[href^="#cypress-plugin-snapshot-"]:hover { color: #fad7db; } a[href^="#cypress-plugin-snapshot-"]:before { content: "√ "; font-weight: bold; } .command-state-pending a[href^="#cypress-plugin-snapshot-"]:before { content: "!! "; } .command-state-failed a[href^="#cypress-plugin-snapshot-"]:before { content: "<> "; } .snapshot-diff { background: white; width: 75vw; height: 50vh; overflow-y: scroll; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 50; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 1px 3px #ccc; } .snapshot-diff--image { width: 90vw; height: 90vh; } .snapshot-diff .d2h-wrapper { margin: 1em; } .snapshot-diff header { position: fixed; left: 0; right: 0; height: 3em; box-sizing: border-box; background: #f8f8f8; display: block; padding: .75em 1em; border-bottom: 1px solid #ccc; } .snapshot-diff-content { overflow-y: scroll; position: absolute; left: 0; right: 0; bottom: 0; top: 0; margin-top: 3em; } .snapshot-diff header button { border: 0; background: transparent; font-size: .75em; padding: 6px; border-radius: 2px; cursor: pointer; } .snapshot-diff header button.snapshot-btn-approve { background: #08c18d; color: white; font-weight: bold; } .snapshot-diff header button.snapshot-btn-close { float: right; } .snapshot-image { display: inline-block; width: 50%; } .snapshot-image--single { width: 100%; } .snapshot-image--single .snapshot-image__image { position: relative; max-width: 100%; max-height: 100%; width: auto; } .snapshot-image__wrapper { width: 100%; height: 0; overflow: hidden; position: relative; background-size: 100% auto; background-repeat: no-repeat; } .snapshot-image__image { position: absolute; top: 0; height: auto; width: 100%; } .snapshot-image--diff { position: absolute; left: 0; top: 0; opacity: 0; transition: all ease-in-out 100ms; } .snapshot-image--diff:active, .snapshot-image--diff:hover { opacity: 1; } .snapshot-image__title { color: #555; font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: bold; margin-bottom: .75em; text-align: center; }