Skip to content

Commit ebb36fe

Browse files
author
Konstantinacc
committed
Added test that deletes all demo_user's projects.
This is a test that should be run only when something goes wrong during a test's execution and projects are left on demo_user's profile.
1 parent 1bfefe5 commit ebb36fe

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/delete_sketches/__init__.py

Whitespace-only changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from codebender_testing.config import STAGING_SITE_URL
2+
from selenium.webdriver.common.by import By
3+
from codebender_testing.utils import SeleniumTestCase
4+
import pytest
5+
6+
class TestDeleteAllSketches(SeleniumTestCase):
7+
8+
@pytest.mark.requires_url(STAGING_SITE_URL)
9+
def test_delete(self, tester_login):
10+
sketches = self.driver.find_elements(By.CSS_SELECTOR, '#project_list > li >a')
11+
projects = []
12+
for sketch in sketches:
13+
projects.append(sketch.text)
14+
for project in projects:
15+
self.delete_project(project)

0 commit comments

Comments
 (0)