Skip to content

Commit d6bab6a

Browse files
committed
Store artifacts and debug
1 parent 469bcb7 commit d6bab6a

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/tests.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,11 @@ jobs:
4343
bundle exec rails db:setup
4444
- name: Run RSpec
4545
run: |
46-
bundle exec rspec
46+
bundle exec rspec spec/features/home_spec.rb
47+
- uses: actions/upload-artifact@v2
48+
if: failure()
49+
with:
50+
name: Screenshots and logs
51+
path: |
52+
tmp/capybara
53+
log

spec/features/home_spec.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,19 @@
1717

1818
it "allows re-arranging the sub projects", js: true do
1919
visit root_path
20+
save_screenshot
2021

2122
first = find("a", text: sub_project1.title)
2223
last = find("a", text: sub_project3.title)
2324

2425
# this will move `last` BEFORE `first`
26+
save_screenshot
2527
last.drag_to(first)
26-
expect(page).to have_selector("#project_#{project.id}.project-card.sorting")
28+
save_screenshot
29+
sleep(0.1)
30+
save_screenshot
2731
expect(page).not_to have_selector("#project_#{project.id}.project-card.sorting")
32+
save_screenshot
2833

2934
expect(sub_project1.reload.position).to eq 2
3035
expect(sub_project2.reload.position).to eq 3

0 commit comments

Comments
 (0)