Skip to content

Auth tests to use unique emails based on UNIX timestamp at time of running the test #5

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

Open
wants to merge 2 commits into
base: 4.x
Choose a base branch
from
Open
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
7 changes: 5 additions & 2 deletions tests/auth/auth.gd
Original file line number Diff line number Diff line change
@@ -6,18 +6,21 @@ extends Node2D
@onready var _test_running = false
@onready var console = $console
var _auth_error = false
var _email1 : String
var _email2 : String

signal test_finished()

# Constants
const _email1 = 'test@fakeemail.com'
const _email2 = 'test2@fakeemail.com'
const _password1 = 'ThisPasswordIsAwesome'
const _password2 = 'ThisPasswordIsStillAwesome'
const _timer_length = 5

# Function called when the scene is ready
func _ready():
var now:int = Time.get_unix_time_from_system()
_email1 = "test_%s@fakeemail.com" % now
_email2 = "test2_%s@fakeemail.com" % now
Firebase.Auth.login_succeeded.connect(_on_FirebaseAuth_login_succeeded)
Firebase.Auth.signup_succeeded.connect(_on_FirebaseAuth_signup_succeeded)
Firebase.Auth.login_failed.connect(_on_login_failed)