Skip to content

Commit

Permalink
Merge pull request #52 from andrewloftus24/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
andrewloftus24 committed Dec 7, 2021
2 parents 036231d + 79fd75a commit 692635d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# CMSC-447-Spotify-04 - Andrew's Develop Branch
# CMSC-447-Spotify-04

## Changelog - 12/7/21

* Added Selenium to run tests. Currently, only runs a login test.

## Changelog - 11/21/21

Expand Down Expand Up @@ -28,6 +32,7 @@
* social-auth-app-django 5.0.0
* social-auth-core 4.1.0
* npm 6.14.13
* Selenium 3.141

## How To Run

Expand All @@ -37,6 +42,8 @@
* To run the server, ensure you are in root directory (from last step, type "cd .."). Then, run "python manage.py runserver"
* Once the server is running, click the link in the terminal or visit "http://127.0.0.1:8000/"
* To close the server, press "CTRL+C" in the terminal
*
* To run tests use the command "python manage.py test"

## Future Additions

Expand Down
1 change: 0 additions & 1 deletion brackets/src/Components/Room.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react';
import CreateRoom from './CreateRoom';
import SingleElimination from './SingleElim';
import GetCookie from './GetCookie';
import GetRoom from './GetRoom';
import { useHistory } from "react-router-dom";
import { withRouter } from 'react-router';

Expand Down
22 changes: 21 additions & 1 deletion brackets/tests.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
from django.test import TestCase
from django.test import LiveServerTestCase
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from webdriver_manager.chrome import ChromeDriverManager
import time

# Create your tests here.
class LoginTest(LiveServerTestCase):
port = 8000

def testlogin(self):
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.get('http://127.0.0.1:8000/')
loginButton = driver.find_element_by_link_text('Login')

loginButton.send_keys(Keys.RETURN)
username= driver.find_element_by_id("login-username")
password = driver.find_element_by_id("login-password")

username.send_keys('447spotify04@gmail.com')
password.send_keys('Quasar04')
submitButton = driver.find_element_by_id("login-button")
submitButton.send_keys(Keys.RETURN)
Binary file modified requirements.txt
Binary file not shown.
2 changes: 1 addition & 1 deletion spotifytournament/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['127.0.0.1', 'localhost']


# Application definition
Expand Down

0 comments on commit 692635d

Please sign in to comment.