[openstreetmap/openstreetmap-website] Changeset page fixes (PR #4463)

Anton Khorev notifications at github.com
Tue Jan 9 12:30:38 UTC 2024


But do you want test like this that check that there's a form with `action='#'` inside some unspecified `div`?

```ruby
    assert_select "div#content" do
      assert_select "div#sidebar" do
        assert_select "div#sidebar_content" do
          assert_select "div" do
            assert_select "form[action='#']" do
              assert_select "textarea[name=text]"
            end
          end
        end
      end
    end
```

The exact structure is not important and I change it here anyway. The important thing is that it is inside the sidebar.

How about tests like this?

```ruby
    within_sidebar do
      assert_no_button "Comment"
      assert_text "Changeset still open"
    end
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4463#issuecomment-1882987103
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4463/c1882987103 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240109/270964ad/attachment.htm>


More information about the rails-dev mailing list