summaryrefslogtreecommitdiff
path: root/app/test
diff options
context:
space:
mode:
Diffstat (limited to 'app/test')
-rw-r--r--app/test/test_add_word_and_essay_does_not_change.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/test/test_add_word_and_essay_does_not_change.py b/app/test/test_add_word_and_essay_does_not_change.py
index 576e432..ff7b90b 100644
--- a/app/test/test_add_word_and_essay_does_not_change.py
+++ b/app/test/test_add_word_and_essay_does_not_change.py
@@ -63,8 +63,9 @@ def test_add_word_and_essay_does_not_change():
driver.save_screenshot('./app/test/test_add_word_and_essay_does_not_change_pic1.png')
elem = driver.find_element_by_id('text-content')
current_essay_content = elem.text
-
- assert current_essay_content == essay_content
+
+ index = current_essay_content.find('for you.')
+ assert current_essay_content[index:] == essay_content[index:]
# click the Next button. Now the essay should change.
elem = driver.find_element_by_xpath('//form[1]//input[1]') # 找到get所有词频按钮
@@ -75,6 +76,6 @@ def test_add_word_and_essay_does_not_change():
elem = driver.find_element_by_id('text-content')
next_essay_content = elem.text
- assert current_essay_content != next_essay_content
+ assert current_essay_content[index:] != next_essay_content[index:]
finally:
driver.quit()