from . import TheInternetTestCase
from helium.api import click, Text, press, CONTROL, COMMAND, write
from sys import platform

class WYSIWYGEditorTest(TheInternetTestCase):
	def get_page(self):
		return "http://the-internet.herokuapp.com/tinymce"
	def test_use_wysiwyg_editor(self):
		self.assertTrue(Text("Your content goes here.").exists())
		click("Your content goes here.")
		if platform == 'darwin':
			press(COMMAND + 'a')
		else:
			press(CONTROL + 'a')
		write("Hello Helium!")
		self.assertTrue(Text("Hello Helium!").exists())
from . import TheInternetTestCase
from helium.api import click, Text, write

class WYSIWYGEditorTest(TheInternetTestCase):
	def get_page(self):
		return "http://the-internet.herokuapp.com/tinymce"
	def test_use_wysiwyg_editor(self):
		self.assertTrue(Text("Your content goes here.").exists())
		click("File")
		click("New document")
		write("Hello Helium!")
		self.assertTrue(Text("Hello Helium!").exists())
Simplify the WYSIWYG editor test case.
Simplify the WYSIWYG editor test case.

  from . import TheInternetTestCase
- from helium.api import click, Text, press, CONTROL, COMMAND, write
+ from helium.api import click, Text, write
- from sys import platform
  
  class WYSIWYGEditorTest(TheInternetTestCase):
  	def get_page(self):
  		return "http://the-internet.herokuapp.com/tinymce"
  	def test_use_wysiwyg_editor(self):
  		self.assertTrue(Text("Your content goes here.").exists())
+ 		click("File")
+ 		click("New document")
- 		click("Your content goes here.")
- 		if platform == 'darwin':
- 			press(COMMAND + 'a')
- 		else:
- 			press(CONTROL + 'a')
  		write("Hello Helium!")
  		self.assertTrue(Text("Hello Helium!").exists())
Simplify the WYSIWYG editor test case.
## Code Before:
from . import TheInternetTestCase
from helium.api import click, Text, press, CONTROL, COMMAND, write
from sys import platform

class WYSIWYGEditorTest(TheInternetTestCase):
	def get_page(self):
		return "http://the-internet.herokuapp.com/tinymce"
	def test_use_wysiwyg_editor(self):
		self.assertTrue(Text("Your content goes here.").exists())
		click("Your content goes here.")
		if platform == 'darwin':
			press(COMMAND + 'a')
		else:
			press(CONTROL + 'a')
		write("Hello Helium!")
		self.assertTrue(Text("Hello Helium!").exists())
## Instruction:
Simplify the WYSIWYG editor test case.
## Code After:
from . import TheInternetTestCase
from helium.api import click, Text, write

class WYSIWYGEditorTest(TheInternetTestCase):
	def get_page(self):
		return "http://the-internet.herokuapp.com/tinymce"
	def test_use_wysiwyg_editor(self):
		self.assertTrue(Text("Your content goes here.").exists())
		click("File")
		click("New document")
		write("Hello Helium!")
		self.assertTrue(Text("Hello Helium!").exists())