Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to support Fedora #37

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.idea/*
*cache*
*cache*
*.code-workspace
10 changes: 5 additions & 5 deletions Graphical/local-user-graphical-login.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def test_login_with_sc(local_user, required):
gui.kb_send('enter', wait_time=20)
# Mandatory wait to switch display from GDM to GNOME
# Not waiting can actually mess up the output
gui.assert_text('Activities')
gui.check_home_screen()


@pytest.mark.parametrize("required", [(True), (False)])
Expand Down Expand Up @@ -101,7 +101,7 @@ def test_login_with_sc_wrong(local_user, required):
gui.kb_send('enter', wait_time=20)
# Mandatory wait to switch display from GDM to GNOME
# Not waiting can actually mess up the output
gui.assert_no_text('Activities')
gui.check_home_screen(False)
gui.assert_text('PIN')


Expand All @@ -128,7 +128,7 @@ def test_login_password(local_user):
gui.kb_write(local_user.password)
with assert_log(SECURE_LOG, expected_log):
gui.kb_send('enter', wait_time=20)
gui.assert_text('Activities')
gui.check_home_screen()


def test_login_password_wrong(local_user):
Expand Down Expand Up @@ -158,7 +158,7 @@ def test_login_password_wrong(local_user):
with assert_log(SECURE_LOG, expected_log):
gui.kb_send('enter', wait_time=20)

gui.assert_no_text('Activities')
gui.check_home_screen(False)
gui.assert_text('Password')


Expand Down Expand Up @@ -199,4 +199,4 @@ def test_insert_card_prompt(local_user, lock_on_removal):
gui.kb_send('enter', wait_time=20)
# Mandatory wait to switch display from GDM to GNOME
# Not waiting can actually mess up the output
gui.assert_text('Activities')
gui.check_home_screen()
16 changes: 8 additions & 8 deletions Graphical/local-user-lock-on-removal.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_lock_on_removal(local_user, required):
gui.kb_write(local_user.pin)
gui.kb_send('enter', wait_time=20)
# confirm that you are logged in
gui.assert_text('Activities')
gui.check_home_screen()

# remove the card and wait for the screen to lock
card.remove()
Expand All @@ -71,7 +71,7 @@ def test_lock_on_removal(local_user, required):
gui.kb_send('enter', screenshot=False)
# Confirm that the screen is locked
# After the screen has been locked, there should be no Activities
gui.assert_no_text('Activities')
gui.check_home_screen(False)
gui.assert_text('insert')

card.insert()
Expand All @@ -80,7 +80,7 @@ def test_lock_on_removal(local_user, required):
gui.kb_write(local_user.pin)
gui.kb_send('enter', wait_time=20)
# confirm that you are logged back in
gui.assert_text('Activities')
gui.check_home_screen()


def test_lock_on_removal_password(local_user):
Expand All @@ -105,15 +105,15 @@ def test_lock_on_removal_password(local_user):
gui.click_on(local_user.username)
gui.kb_write(local_user.password)
gui.kb_send('enter', wait_time=20)
gui.assert_text('Activities')
gui.check_home_screen()

card.insert()
sleep(10)
card.remove()
sleep(10)

# Screen should be unlocked
gui.assert_text('Activities')
gui.check_home_screen()


@pytest.mark.parametrize("lock_on_removal", [(True), (False)])
Expand Down Expand Up @@ -146,7 +146,7 @@ def test_lockscreen_password(local_user, lock_on_removal):
gui.click_on(local_user.username)
gui.kb_write(local_user.password)
gui.kb_send('enter', wait_time=20)
gui.assert_text('Activities')
gui.check_home_screen()

card.insert()
sleep(10)
Expand All @@ -162,9 +162,9 @@ def test_lockscreen_password(local_user, lock_on_removal):
gui.kb_send('enter', screenshot=False)
# Confirm that the screen is locked
# After the screen has been locked, there should be no Activities
gui.assert_no_text('Activities')
gui.check_home_screen(False)
gui.click_on('Password', check_difference=False)
gui.kb_write(local_user.password)
gui.kb_send('enter', wait_time=10)
# confirm that you are logged back in
gui.assert_text('Activities')
gui.check_home_screen()
Loading