-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from blockchain-certificates/feat/animation-ve…
…rification-step fix: not showing final verification step when not needed
- Loading branch information
Showing
8 changed files
with
176 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
test/components/verification/success/verification-process-success-final-step.test.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>VerificationProcess component test suite</title> | ||
|
||
<script src="../../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script> | ||
<script src="../../../../node_modules/web-component-tester/browser.js"></script> | ||
|
||
<script src="../../helpers/redux-hack.js"></script> | ||
<script src="../../helpers/wait.js"></script> | ||
<script type="module" src="../../../../src/blockcerts-verifier/index.js"></script> | ||
</head> | ||
<body> | ||
<test-fixture id="success"> | ||
<template> | ||
<blockcerts-verifier src="https://auto-certificates.learningmachine.io/certificate/0cc5fb04900856b4aeb3733af2e019df"></blockcerts-verifier> | ||
</template> | ||
</test-fixture> | ||
|
||
<script type="module"> | ||
describe('VerificationProcess test suite', function () { | ||
describe('given the certificate verification has succeeded', function () { | ||
xit('should show the final verification step', async function () { | ||
const el = fixture('success').shadowRoot.querySelectorAll('buv-raw')[0]; | ||
await wait(1000); | ||
const verificationProcessModalElement = el.shadowRoot.querySelectorAll('buv-verification-modal')[0]; | ||
await wait(1000); | ||
const verificationProcessElement = verificationProcessModalElement.shadowRoot.querySelectorAll('buv-verification-process')[0]; | ||
await wait(1000); | ||
const verificationProcessRawElement = verificationProcessElement.shadowRoot.querySelectorAll('buv-verification-process-raw')[0]; | ||
await wait(3000); | ||
const finalStepElement = verificationProcessRawElement.shadowRoot.querySelectorAll('.buv-qa-verification-step.is-final')[0]; | ||
expect(finalStepElement.classList.contains('is-visible')).to.equal(true); | ||
}); | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
40 changes: 40 additions & 0 deletions
40
test/components/verification/success/verification-process-success-no-error-state.test.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>VerificationProcess component test suite</title> | ||
|
||
<script src="../../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script> | ||
<script src="../../../../node_modules/web-component-tester/browser.js"></script> | ||
|
||
<script src="../../helpers/redux-hack.js"></script> | ||
<script src="../../helpers/wait.js"></script> | ||
<script type="module" src="../../../../src/blockcerts-verifier/index.js"></script> | ||
</head> | ||
<body> | ||
<test-fixture id="success"> | ||
<template> | ||
<blockcerts-verifier src="https://auto-certificates.learningmachine.io/certificate/0cc5fb04900856b4aeb3733af2e019df"></blockcerts-verifier> | ||
</template> | ||
</test-fixture> | ||
|
||
<script type="module"> | ||
describe('VerificationProcess test suite', function () { | ||
describe('given the certificate verification has succeeded', function () { | ||
xit('should not show the error state', async function () { | ||
const el = fixture('success').shadowRoot.querySelectorAll('buv-raw')[0]; | ||
await wait(1000); | ||
const verificationProcessModalElement = el.shadowRoot.querySelectorAll('buv-verification-modal')[0]; | ||
await wait(1000); | ||
const verificationProcessElement = verificationProcessModalElement.shadowRoot.querySelectorAll('buv-verification-process')[0]; | ||
await wait(1000); | ||
const verificationProcessRawElement = verificationProcessElement.shadowRoot.querySelectorAll('buv-verification-process-raw')[0]; | ||
await wait(3000); | ||
const progressBarElement = verificationProcessRawElement.shadowRoot.querySelectorAll('.buv-qa-verification-progress-bar__tube')[0]; | ||
expect(progressBarElement.classList.contains('has-errored')).to.equal(false); | ||
}); | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
53 changes: 53 additions & 0 deletions
53
test/components/verification/verification-process-failing.test.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>VerificationProcess component test suite</title> | ||
|
||
<script src="../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script> | ||
<script src="../../../node_modules/web-component-tester/browser.js"></script> | ||
|
||
<script src="../helpers/redux-hack.js"></script> | ||
<script src="../helpers/wait.js"></script> | ||
<script type="module" src="../../../src/blockcerts-verifier/index.js"></script> | ||
</head> | ||
<body> | ||
<test-fixture id="failing"> | ||
<template> | ||
<blockcerts-verifier src="https://certificates.learningmachine.com/certificate/34299968e25f5c9985a2f7de988c4bd0"></blockcerts-verifier> | ||
</template> | ||
</test-fixture> | ||
|
||
<script type="module"> | ||
describe('VerificationProcess test suite', function () { | ||
describe('given the certificate verification has failed', function () { | ||
it('should show the error state', async function () { | ||
const el = fixture('failing').shadowRoot.querySelectorAll('buv-raw')[0]; | ||
await wait(1000); | ||
const verificationProcessModalElement = el.shadowRoot.querySelectorAll('buv-verification-modal')[0]; | ||
await wait(1000); | ||
const verificationProcessElement = verificationProcessModalElement.shadowRoot.querySelectorAll('buv-verification-process')[0]; | ||
await wait(1000); | ||
const verificationProcessRawElement = verificationProcessElement.shadowRoot.querySelectorAll('buv-verification-process-raw')[0]; | ||
await wait(1000); | ||
const progressBarElement = verificationProcessRawElement.shadowRoot.querySelectorAll('.buv-qa-verification-progress-bar__tube')[0]; | ||
expect(progressBarElement.classList.contains('has-errored')).to.equal(true); | ||
}); | ||
|
||
it('should not show the final verification step', async function () { | ||
const el = fixture('failing').shadowRoot.querySelectorAll('buv-raw')[0]; | ||
await wait(1000); | ||
const verificationProcessModalElement = el.shadowRoot.querySelectorAll('buv-verification-modal')[0]; | ||
await wait(1000); | ||
const verificationProcessElement = verificationProcessModalElement.shadowRoot.querySelectorAll('buv-verification-process')[0]; | ||
await wait(1000); | ||
const verificationProcessRawElement = verificationProcessElement.shadowRoot.querySelectorAll('buv-verification-process-raw')[0]; | ||
await wait(1000); | ||
const finalStepElement = verificationProcessRawElement.shadowRoot.querySelectorAll('.buv-qa-verification-step.is-final')[0]; | ||
expect(finalStepElement.classList.contains('is-visible')).to.equal(false); | ||
}) | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
39 changes: 39 additions & 0 deletions
39
test/components/verification/verification-process-started-no-final-step.test.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>VerificationProcess component test suite</title> | ||
|
||
<script src="../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script> | ||
<script src="../../../node_modules/web-component-tester/browser.js"></script> | ||
|
||
<script src="../helpers/redux-hack.js"></script> | ||
<script src="../helpers/wait.js"></script> | ||
<script type="module" src="../../../src/blockcerts-verifier/index.js"></script> | ||
</head> | ||
<body> | ||
<test-fixture id="started"> | ||
<template> | ||
<blockcerts-verifier src="https://certificates.learningmachine.com/certificate/34299968e25f5c9985a2f7de988c4bd0"></blockcerts-verifier> | ||
</template> | ||
</test-fixture> | ||
|
||
<script type="module"> | ||
describe('VerificationProcess test suite', function () { | ||
describe('given the certificate verification has started', function () { | ||
it('should not show the final verification step', async function () { | ||
const el = fixture('started').shadowRoot.querySelectorAll('buv-raw')[0]; | ||
await wait(500); | ||
const verificationProcessModalElement = el.shadowRoot.querySelectorAll('buv-verification-modal')[0]; | ||
await wait(500); | ||
const verificationProcessElement = verificationProcessModalElement.shadowRoot.querySelectorAll('buv-verification-process')[0]; | ||
await wait(500); | ||
const verificationProcessRawElement = verificationProcessElement.shadowRoot.querySelectorAll('buv-verification-process-raw')[0]; | ||
const finalStepElement = verificationProcessRawElement.shadowRoot.querySelectorAll('.buv-qa-verification-step.is-final')[0]; | ||
expect(finalStepElement.classList.contains('is-visible')).to.equal(false); | ||
}); | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.