
import pytest

from pages.firefox.hello import HelloPage


@pytest.mark.smoke
@pytest.mark.nondestructive
def test_play_video(base_url, selenium):
    page = HelloPage(base_url, selenium).open()
    video = page.play_video()
    assert video.is_displayed
    video.close()


@pytest.mark.skip_if_not_firefox
@pytest.mark.smoke
@pytest.mark.nondestructive
def test_try_hello_button_is_displayed(base_url, selenium):
    page = HelloPage(base_url, selenium).open()
    assert page.is_try_hello_button_displayed
    assert not page.is_download_button_displayed


@pytest.mark.skip_if_firefox
@pytest.mark.smoke
@pytest.mark.nondestructive
def test_download_button_is_displayed(base_url, selenium):
    page = HelloPage(base_url, selenium).open()
    assert page.is_download_button_displayed
    assert not page.is_try_hello_button_displayed


import pytest

from pages.firefox.hello import HelloPage


@pytest.mark.smoke
@pytest.mark.nondestructive
def test_play_video(base_url, selenium):
    page = HelloPage(base_url, selenium).open()
    video = page.play_video()
    assert video.is_displayed
    video.close()


@pytest.mark.skip_if_not_firefox
@pytest.mark.smoke
@pytest.mark.nondestructive
def test_try_hello_button_is_displayed(base_url, selenium):
    page = HelloPage(base_url, selenium).open()
    assert page.is_try_hello_button_displayed


@pytest.mark.skip_if_firefox
@pytest.mark.smoke
@pytest.mark.nondestructive
def test_download_button_is_displayed(base_url, selenium):
    page = HelloPage(base_url, selenium).open()
    assert page.is_download_button_displayed
    assert not page.is_try_hello_button_displayed

Fix failing Firefox Hello test
Fix failing Firefox Hello test

  
  import pytest
  
  from pages.firefox.hello import HelloPage
  
  
  @pytest.mark.smoke
  @pytest.mark.nondestructive
  def test_play_video(base_url, selenium):
      page = HelloPage(base_url, selenium).open()
      video = page.play_video()
      assert video.is_displayed
      video.close()
  
  
  @pytest.mark.skip_if_not_firefox
  @pytest.mark.smoke
  @pytest.mark.nondestructive
  def test_try_hello_button_is_displayed(base_url, selenium):
      page = HelloPage(base_url, selenium).open()
      assert page.is_try_hello_button_displayed
-     assert not page.is_download_button_displayed
  
  
  @pytest.mark.skip_if_firefox
  @pytest.mark.smoke
  @pytest.mark.nondestructive
  def test_download_button_is_displayed(base_url, selenium):
      page = HelloPage(base_url, selenium).open()
      assert page.is_download_button_displayed
      assert not page.is_try_hello_button_displayed
  
Fix failing Firefox Hello test
## Code Before:

import pytest

from pages.firefox.hello import HelloPage


@pytest.mark.smoke
@pytest.mark.nondestructive
def test_play_video(base_url, selenium):
    page = HelloPage(base_url, selenium).open()
    video = page.play_video()
    assert video.is_displayed
    video.close()


@pytest.mark.skip_if_not_firefox
@pytest.mark.smoke
@pytest.mark.nondestructive
def test_try_hello_button_is_displayed(base_url, selenium):
    page = HelloPage(base_url, selenium).open()
    assert page.is_try_hello_button_displayed
    assert not page.is_download_button_displayed


@pytest.mark.skip_if_firefox
@pytest.mark.smoke
@pytest.mark.nondestructive
def test_download_button_is_displayed(base_url, selenium):
    page = HelloPage(base_url, selenium).open()
    assert page.is_download_button_displayed
    assert not page.is_try_hello_button_displayed

## Instruction:
Fix failing Firefox Hello test
## Code After:

import pytest

from pages.firefox.hello import HelloPage


@pytest.mark.smoke
@pytest.mark.nondestructive
def test_play_video(base_url, selenium):
    page = HelloPage(base_url, selenium).open()
    video = page.play_video()
    assert video.is_displayed
    video.close()


@pytest.mark.skip_if_not_firefox
@pytest.mark.smoke
@pytest.mark.nondestructive
def test_try_hello_button_is_displayed(base_url, selenium):
    page = HelloPage(base_url, selenium).open()
    assert page.is_try_hello_button_displayed


@pytest.mark.skip_if_firefox
@pytest.mark.smoke
@pytest.mark.nondestructive
def test_download_button_is_displayed(base_url, selenium):
    page = HelloPage(base_url, selenium).open()
    assert page.is_download_button_displayed
    assert not page.is_try_hello_button_displayed
