This repository was archived by the owner on Jan 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 231
test: capture screenshots with capture-chrome, and diff them with resemble #3
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4f9667d
test: capture screenshots with capture-chrome
lynnmercier cfde5f9
capture images during test suite
lynnmercier f9ddc1b
working test suite
lynnmercier 9401af8
run tests with mocha, rename to capture
lynnmercier d52adc9
make test suites
lynnmercier ddaf5ed
adding another test in same directory
lynnmercier dd130de
stuff
lynnmercier fb5b15b
remove debug logging
lynnmercier b63c0f8
some fixes
lynnmercier 883f07d
specify webpack bundles within test directories, avoid merge conflicts
lynnmercier 9394867
test: added 200 check before capture
19e89e4
Merge branch 'test/capture' of github.com:material-components/materia…
f25eed5
test: updated variable names and lint
1ed7895
test: fixed capture 200 check and removed react from babelrc
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,5 @@ | ||
{ | ||
"presets": [ | ||
"es2015" | ||
] | ||
} |
This file contains hidden or 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
coverage | ||
.idea | ||
node_modules | ||
.DS_Store | ||
.DS_Store |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,5 @@ | ||
import fullSuite from './full-suite'; | ||
|
||
fullSuite.forEach((screenshotSuite) => { | ||
screenshotSuite.capture(); | ||
}); |
This file contains hidden or 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,5 @@ | ||
import fullSuite from './full-suite'; | ||
|
||
fullSuite.forEach((screenshotSuite) => { | ||
screenshotSuite.diff(); | ||
}); |
This file contains hidden or 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,7 @@ | ||
import temporaryPackageSuite from './temporary-package/screenshot-suite'; | ||
|
||
const fullSuite = [ | ||
temporaryPackageSuite, | ||
]; | ||
|
||
export default fullSuite; |
This file contains hidden or 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,22 @@ | ||
export default class ScreenshotSuite { | ||
constructor(name, screenshots) { | ||
this.name_ = name; | ||
this.screenshots_ = screenshots; | ||
} | ||
|
||
capture() { | ||
suite(this.name_, () => {}); | ||
|
||
this.screenshots_.forEach((screenshot) => { | ||
screenshot.capture(); | ||
}); | ||
} | ||
|
||
diff() { | ||
suite(this.name_, () => {}); | ||
|
||
this.screenshots_.forEach((screenshot) => { | ||
screenshot.diff(); | ||
}); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also add "react" here? We don't have any jsx files yet, so we can add it then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think i want to wait, because this babelrc is actually affecting our babel translator for the mocha. So basically this is running on like capture-suite.js
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya, but I don't think it affects .js files that don't have JSX in it. It basically compiles the JSX -> JS. Although I'm testing the branch again right now and having issues, but don't think it is related to the .babelrc file.