Skip to content

Commit

Permalink
Reduce flakiness of specs.
Browse files Browse the repository at this point in the history
  • Loading branch information
davywentwortht2it committed Aug 30, 2024
1 parent faefc3c commit 352856c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions client/app/readerprototype/components/Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ const Page = ({ page, rotation = ROTATION_DEGREES.ZERO, renderItem, scale }) =>
contentVisibility: 'auto',
};

useEffect(() => {
if (canvasRef.current) canvasRef.current.addEventListener('contentvisibilityautostatechange', (e) => console.log(e))
}, [canvasRef.current])
useEffect(() => {
if (canvasRef.current) {
page.render({ canvasContext: canvasRef.current?.getContext('2d'), viewport }).promise.catch(() => {
Expand Down
2 changes: 1 addition & 1 deletion spec/feature/reader/reader_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ def cats_in_header
find("h3", text: "Issue tags", wait: 10).click
# tags for first document are shared in tag auto suggestions for second document
page.find("#tags", wait: 10).click
tag_options = find_all(".cf-select__option")
tag_options = find_all(".cf-select__option", wait: 10)
expect(tag_options.count).to eq 4

documents[0].tags.each_with_index do |tag, index|
Expand Down

0 comments on commit 352856c

Please sign in to comment.