@@ -134,56 +134,6 @@ def test_tabbed_fieldsets(page: Page, django_server, client, user):
134
134
expect (field ).to_be_visible ()
135
135
136
136
137
- @pytest .mark .django_db
138
- def test_adding_multiple_content_types (page : Page , django_server , client , user ):
139
- """Test adding different types of content to an article."""
140
- # Login to admin
141
- login_admin (page , django_server )
142
-
143
- # Navigate to article add page
144
- page .goto (f"{ django_server } /admin/testapp/article/add/" )
145
-
146
- # Fill in the title
147
- page .fill ("input[name='title']" , "Multiple Content Types Test" )
148
-
149
- # First click on the insert target to reveal the available plugins
150
- page .click (".order-machine-insert-target" )
151
-
152
- # Wait for the plugin buttons to appear and click Rich Text plugin
153
- page .wait_for_selector (".plugin-button:has-text('Rich text')" )
154
- page .click (".plugin-button:has-text('Rich text')" )
155
-
156
- # Wait for the richtext textarea to appear
157
- page .wait_for_selector ("textarea.richtext" )
158
-
159
- # Fill in the rich text content using simple textarea
160
- page .fill ("textarea.richtext" , "<p>This is a rich text content</p>" )
161
-
162
- # Save the article
163
- page .click ("input[name='_save']" )
164
-
165
- # After redirect, check for success
166
- page .wait_for_selector (".success" , timeout = 5000 )
167
-
168
- # Check that the article was saved successfully
169
- success_message = page .locator (".success" ).text_content ()
170
- assert "successfully" in success_message , (
171
- f"Expected success message, got: { success_message } "
172
- )
173
-
174
- # Check in the database that the article was created
175
-
176
- article = Article .objects .filter (title = "Multiple Content Types Test" ).first ()
177
- assert article is not None , "Article should have been created"
178
-
179
- # Check that it has the rich text content
180
- rich_text_items = article .testapp_richtext_set .all ()
181
- assert len (rich_text_items ) > 0 , "Article should have at least one rich text item"
182
- assert "<p>This is a rich text content</p>" in rich_text_items [0 ].text , (
183
- "Rich text content not saved correctly"
184
- )
185
-
186
-
187
137
@pytest .mark .django_db
188
138
def test_save_shortcut (page : Page , django_server , client , user ):
189
139
"""Test that the save shortcut (Ctrl+S) works."""
0 commit comments