mirror of
https://github.com/TrentSPalmer/hugo_themes_report.git
synced 2024-12-04 08:41:29 -08:00
add test_minus_button.py
This commit is contained in:
parent
00459ca513
commit
4911c65867
52
test/test_minus_button.py
Normal file
52
test/test_minus_button.py
Normal file
@ -0,0 +1,52 @@
|
||||
from test.test_selenium import TestSelenium
|
||||
from unittest import TestCase
|
||||
|
||||
|
||||
class TestMinusButton(TestSelenium, TestCase):
|
||||
def setUp(self):
|
||||
super(TestMinusButton, self).setUp()
|
||||
self.plus_button = self.driver.find_element_by_id('plus-button')
|
||||
self.minus_button = self.driver.find_element_by_id('minus-button')
|
||||
self.selection_options_menu = self.driver.find_element_by_id(
|
||||
'selection-options-menu')
|
||||
|
||||
def test_minus_button_props(self):
|
||||
self.assertEqual(
|
||||
self.minus_button.value_of_css_property('display'), 'none')
|
||||
self.assertEqual(
|
||||
self.minus_button.value_of_css_property('height'), '48px')
|
||||
self.assertEqual(
|
||||
self.minus_button.value_of_css_property('width'), '48px')
|
||||
self.assertEqual(
|
||||
self.minus_button.value_of_css_property(
|
||||
'color'), 'rgba(68, 68, 68, 1)')
|
||||
self.assertEqual(
|
||||
self.minus_button.value_of_css_property(
|
||||
'background-color'), 'rgba(204, 204, 204, 1)')
|
||||
self.assertEqual(
|
||||
self.selection_options_menu.value_of_css_property(
|
||||
'display'), 'none')
|
||||
|
||||
def test_minus_button_after_click_first_level(self):
|
||||
self.assertEqual(
|
||||
self.plus_button.value_of_css_property('display'), 'block')
|
||||
self.plus_button.click()
|
||||
self.assertEqual(
|
||||
self.minus_button.value_of_css_property('display'), 'block')
|
||||
self.minus_button.click()
|
||||
self.assertEqual(
|
||||
self.minus_button.value_of_css_property('display'), 'none')
|
||||
self.assertEqual(
|
||||
self.plus_button.value_of_css_property('display'), 'block')
|
||||
self.assertEqual(
|
||||
self.selection_options_menu.value_of_css_property(
|
||||
'display'), 'none')
|
||||
|
||||
def test_minus_button_before_click_first_level(self):
|
||||
self.assertEqual(
|
||||
self.selection_options_menu.value_of_css_property(
|
||||
'display'), 'none')
|
||||
self.plus_button.click()
|
||||
self.assertEqual(
|
||||
self.selection_options_menu.value_of_css_property(
|
||||
'display'), 'flex')
|
Loading…
Reference in New Issue
Block a user