Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c559b75
Add an initial commit to allow making a pull request
trichoplax Mar 23, 2025
71d54e6
Fix test class name
trichoplax Mar 24, 2025
54243ab
Add tests to see what users see
trichoplax Mar 24, 2025
31c969a
Merge branch '0valt/seeds' into temporary-branch-for-testing-ci-failures
trichoplax Mar 25, 2025
5e611ba
Add test to log out before checking basic_user
trichoplax Mar 25, 2025
95c14ef
quick test for logging out on teardown
Oaphi Mar 25, 2025
64bdfda
Revert "quick test for logging out on teardown"
Oaphi Mar 25, 2025
07c8726
Visit page before trying to log out
trichoplax Mar 25, 2025
0fa4a41
Merge branch 'develop' into temporary-branch-for-testing-ci-failures
trichoplax Apr 1, 2025
9a5647f
Merge branch 'develop' into temporary-branch-for-testing-ci-failures
trichoplax Jun 19, 2025
4a6abbf
Merge branch 'develop' into temporary-branch-for-testing-ci-failures
trichoplax Jun 19, 2025
bce740a
Merge branch 'develop' into temporary-branch-for-testing-ci-failures
trichoplax Jun 22, 2025
503c892
Merge branch 'develop' into temporary-branch-for-testing-ci-failures
trichoplax Jun 30, 2025
3e2dc74
Merge branch 'develop' into temporary-branch-for-testing-ci-failures
trichoplax Jul 5, 2025
75c3498
Merge branch 'develop' into temporary-branch-for-testing-ci-failures
trichoplax Jul 14, 2025
816b15e
Extra tests to try to see why posts don't show in category page
trichoplax Jul 16, 2025
f00896b
Merge branch 'develop' into temporary-branch-for-testing-ci-failures
trichoplax Jul 28, 2025
e9a3416
Fix double quotes and blank line for rubocop
trichoplax Jul 28, 2025
98909da
Merge branch 'develop' into temporary-branch-for-testing-ci-failures
trichoplax Jul 31, 2025
9086e61
Merge branch 'develop' into temporary-branch-for-testing-ci-failures
trichoplax Jul 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions test/application_system_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,16 @@ def post_form_select_tag(tag_name, create_new = false)
'but could not select it from options without creating a new tag.'
end
end

def create_post(button_label, body, title, tags)
click_button(button_label)
fill_in('Body', with: body)
fill_in('Summarize your post with a title:', with: title)

tags.each do |tag|
post_form_select_tag(tag)
end

click_button('Save Post in ')
end
end
79 changes: 79 additions & 0 deletions test/system/ci_failures_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
require 'application_system_test_case'

class CIFailuresTest < ApplicationSystemTestCase
test 'empty test to start with' do
assert true
end

test 'Anyone can view question' do
post = posts(:question_one)
visit post_url(post)
# category=categories(:main)
# visit category_path(category)

assert_text 'Nonexistent to force screenshot'
end

test 'temporary test to analyse CI failures what does main look like before logging in' do
clear_cache
category = categories(:main)
visit category_path(category)
assert_text 'Nonexistent to force screenshot'
end

test 'temporary test to analyse CI failures what does basic user see in main' do
category = categories(:main)
log_in :basic_user
visit category_path(category)
assert_text 'Nonexistent to force screenshot'
end

test 'temporary test to analyse CI failures what does basic user see in main with log out first' do
category = categories(:main)
visit category_path(category)
log_out
log_in :basic_user
visit category_path(category)
assert_text 'Nonexistent to force screenshot'
end

test 'temporary test to analyse CI failures what does standard user see in main' do
category = categories(:main)
log_in :standard_user
visit category_path(category)
assert_text 'Nonexistent to force screenshot'
end

test 'temporary test to analyse CI failures what does standard user see after adding post to meta' do
category = categories(:meta)
log_in :standard_user
visit category_path(category)
post_title = 'Test title text for testing threads'
create_post('Test body text for testing threads.', post_title)
assert_text 'Unfollow new' # Ensure post has finished saving to avoid timing problems

log_out
log_in :standard_user
visit category_path(category)
assert_text 'Nonexistent to force screenshot'
end

test 'temporary test to analyse CI failures what does basic user see after adding post to main' do
category = categories(:main)
log_in :standard_user
visit category_path(category)
button_label = 'Create Post'
post_body = 'Test body text for testing threads.'
post_title = 'Test title text for testing threads'
tags = ['bug']
create_post(button_label, post_body, post_title, tags)
assert_text 'Unfollow new' # Ensure post has finished saving to avoid timing problems

log_out
assert_text 'Sign in'

log_in :basic_user
visit category_path(category)
assert_text '0 posts'
end
end
Loading