Compare commits
No commits in common. "6e41cb48cd009191436a5d1b3a986987a63709ac" and "6c663a00a54db37d1944bf97af4e8fc30557a07c" have entirely different histories.
6e41cb48cd
...
6c663a00a5
homepage
test
SeleniumHui
|
@ -151,6 +151,10 @@ echo "<div><a href='Courses.php?course=$url'> $header </a></div>";
|
|||
$submitted_by = "$student_name ($submitter_student_number) for group $groupname ";
|
||||
}
|
||||
|
||||
$base_att1 = basename(rawurldecode($att1));
|
||||
$base_att2 = basename(rawurldecode($att2));
|
||||
$base_att3 = basename(rawurldecode($att3));
|
||||
$base_att4 = basename(rawurldecode($att4));
|
||||
$base_att1 = basename($att1);
|
||||
$base_att2 = basename($att2);
|
||||
$base_att3 = basename($att3);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
@font-face {
|
||||
font-family: "Linux Libertine";
|
||||
src: url("fonts/LinLibertine_RZ.woff") format('woff');
|
||||
font-family: 'Linux Libertine';
|
||||
src: url('fonts/LinLibertine_RZ.woff') format('woff');
|
||||
}
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
|
@ -10,10 +10,25 @@ html {
|
|||
body {
|
||||
margin: 0;
|
||||
}
|
||||
article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary {
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
main,
|
||||
menu,
|
||||
nav,
|
||||
section,
|
||||
summary {
|
||||
display: block;
|
||||
}
|
||||
audio,canvas,progress,video {
|
||||
audio,
|
||||
canvas,
|
||||
progress,
|
||||
video {
|
||||
display: inline-block;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
@ -21,19 +36,22 @@ audio:not([controls]) {
|
|||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
[hidden],template {
|
||||
[hidden],
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
a:active,a:hover {
|
||||
a:active,
|
||||
a:hover {
|
||||
outline: 0;
|
||||
}
|
||||
abbr[title] {
|
||||
border-bottom: 1px dotted;
|
||||
}
|
||||
b,strong {
|
||||
b,
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
dfn {
|
||||
|
@ -50,7 +68,8 @@ mark {
|
|||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
sub,sup {
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
|
@ -79,11 +98,18 @@ hr {
|
|||
pre {
|
||||
overflow: auto;
|
||||
}
|
||||
code,kbd,pre,samp {
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
button,input,optgroup,select,textarea {
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
margin: 0;
|
||||
|
@ -91,35 +117,44 @@ button,input,optgroup,select,textarea {
|
|||
button {
|
||||
overflow: visible;
|
||||
}
|
||||
button,select {
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
button,html input[type="button"], input[type="reset"],input[type="submit"] {
|
||||
button,
|
||||
html input[type='button'],
|
||||
input[type='reset'],
|
||||
input[type='submit'] {
|
||||
-webkit-appearance: button;
|
||||
cursor: pointer;
|
||||
}
|
||||
button[disabled],html input[disabled] {
|
||||
button[disabled],
|
||||
html input[disabled] {
|
||||
cursor: default;
|
||||
}
|
||||
button::-moz-focus-inner,input::-moz-focus-inner {
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
input {
|
||||
line-height: normal;
|
||||
}
|
||||
input[type="checkbox"],input[type="radio"] {
|
||||
input[type='checkbox'],
|
||||
input[type='radio'] {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button {
|
||||
input[type='number']::-webkit-inner-spin-button,
|
||||
input[type='number']::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
input[type="search"] {
|
||||
input[type='search'] {
|
||||
-webkit-appearance: textfield;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration {
|
||||
input[type='search']::-webkit-search-cancel-button,
|
||||
input[type='search']::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
fieldset {
|
||||
|
@ -141,7 +176,8 @@ table {
|
|||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
td,th {
|
||||
td,
|
||||
th {
|
||||
padding: 0;
|
||||
}
|
||||
html {
|
||||
|
@ -165,7 +201,12 @@ hr {
|
|||
margin: 1em 0;
|
||||
padding: 0;
|
||||
}
|
||||
audio,canvas,iframe,img,svg,video {
|
||||
audio,
|
||||
canvas,
|
||||
iframe,
|
||||
img,
|
||||
svg,
|
||||
video {
|
||||
vertical-align: middle;
|
||||
}
|
||||
fieldset {
|
||||
|
@ -195,7 +236,8 @@ textarea {
|
|||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus {
|
||||
.visuallyhidden.focusable:active,
|
||||
.visuallyhidden.focusable:focus {
|
||||
clip: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
|
@ -206,8 +248,9 @@ textarea {
|
|||
.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
.clearfix:before,.clearfix:after {
|
||||
content: " ";
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: ' ';
|
||||
display: table;
|
||||
}
|
||||
.clearfix:after {
|
||||
|
@ -215,49 +258,68 @@ textarea {
|
|||
}
|
||||
@media only screen and (min-width: 35em) {
|
||||
}
|
||||
@media print,(-webkit-min-device-pixel-ratio: 1.25),(min-resolution: 1.25dppx),(min-resolution: 120dpi) {
|
||||
@media print,
|
||||
(-webkit-min-device-pixel-ratio: 1.25),
|
||||
(min-resolution: 1.25dppx),
|
||||
(min-resolution: 120dpi) {
|
||||
}
|
||||
@media print {
|
||||
*,*:before,*:after,*:first-letter,*:first-line {
|
||||
*,
|
||||
*:before,
|
||||
*:after,
|
||||
*:first-letter,
|
||||
*:first-line {
|
||||
background: transparent !important;
|
||||
color: #000 !important;
|
||||
box-shadow: none !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
a,a:visited {
|
||||
a,
|
||||
a:visited {
|
||||
text-decoration: underline;
|
||||
}
|
||||
a[href]:after {
|
||||
content: " (" attr(href) ")";
|
||||
content: ' (' attr(href) ')';
|
||||
}
|
||||
abbr[title]:after {
|
||||
content: " (" attr(title) ")";
|
||||
content: ' (' attr(title) ')';
|
||||
}
|
||||
a[href^="#"]:after,a[href^="javascript:"]:after {
|
||||
content: "";
|
||||
a[href^='#']:after,
|
||||
a[href^='javascript:']:after {
|
||||
content: '';
|
||||
}
|
||||
pre,blockquote {
|
||||
pre,
|
||||
blockquote {
|
||||
border: 1px solid #999;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr,img {
|
||||
tr,
|
||||
img {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
img {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
p,h2,h3 {
|
||||
p,
|
||||
h2,
|
||||
h3 {
|
||||
orphans: 3;
|
||||
widows: 3;
|
||||
}
|
||||
h2,h3 {
|
||||
h2,
|
||||
h3 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
color: #000;
|
||||
background: none;
|
||||
font-weight: normal;
|
||||
|
@ -305,7 +367,8 @@ h1 {
|
|||
letter-spacing: 0;
|
||||
font-size: 2.3em;
|
||||
}
|
||||
a, a:visited {
|
||||
a,
|
||||
a:visited {
|
||||
color: #0645ad;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
@ -316,7 +379,7 @@ a:hover {
|
|||
text-decoration: underline;
|
||||
}
|
||||
.wrapAll {
|
||||
width: 100%.
|
||||
width: 100%.;
|
||||
}
|
||||
.sidebar {
|
||||
float: left;
|
||||
|
@ -332,7 +395,7 @@ a:hover {
|
|||
padding: 0.25em 0;
|
||||
cursor: default;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #D8D8D8;
|
||||
border-bottom: 1px solid #d8d8d8;
|
||||
}
|
||||
.sidebar li {
|
||||
line-height: 1.125em;
|
||||
|
@ -394,10 +457,10 @@ div.articleRightInner {
|
|||
position: relative;
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
border-bottom: 1px solid #A7D7F9;
|
||||
border-bottom: 1px solid #a7d7f9;
|
||||
}
|
||||
.tabs ul li a.active {
|
||||
background: #FFF;
|
||||
background: #fff;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
.tabs ul {
|
||||
|
@ -430,10 +493,10 @@ div.articleRightInner {
|
|||
float: right;
|
||||
overflow: hidden;
|
||||
border: solid 1px #aaa;
|
||||
background: #F6F6F6;
|
||||
background: -moz-linear-gradient(top, #F6F6F6 0%, #FFFFFF 100%);
|
||||
background: -webkit-linear-gradient(top, #F6F6F6 0%, #FFFFFF 100%);
|
||||
background: linear-gradient(to bottom, #F6F6F6 0%, #FFFFFF 100%);
|
||||
background: #f6f6f6;
|
||||
background: -moz-linear-gradient(top, #f6f6f6 0%, #ffffff 100%);
|
||||
background: -webkit-linear-gradient(top, #f6f6f6 0%, #ffffff 100%);
|
||||
background: linear-gradient(to bottom, #f6f6f6 0%, #ffffff 100%);
|
||||
}
|
||||
#searchInput {
|
||||
background: transparent;
|
||||
|
@ -459,7 +522,7 @@ div.articleRightInner {
|
|||
.article {
|
||||
padding: 1.25em 1.5em 1.5em 1.5em;
|
||||
border-left: 1px solid #a7d7f9;
|
||||
background: #FFF;
|
||||
background: #fff;
|
||||
line-height: 1.6;
|
||||
font-size: 0.875em;
|
||||
border-top: 1px solid #a7d7f9;
|
||||
|
@ -489,7 +552,8 @@ span.user {
|
|||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.hidePanel, .showPanel {
|
||||
.hidePanel,
|
||||
.showPanel {
|
||||
float: right;
|
||||
margin: 0 5px;
|
||||
position: absolute;
|
||||
|
@ -519,7 +583,7 @@ span.user {
|
|||
display: block;
|
||||
}
|
||||
.minimizedPanel .hidePanel {
|
||||
display: none
|
||||
display: none;
|
||||
}
|
||||
.contentsPanel.minimizedPanel {
|
||||
width: 130px;
|
||||
|
@ -551,11 +615,11 @@ span.user {
|
|||
background: #ddddff;
|
||||
}
|
||||
.linklist a:after {
|
||||
content: " · ";
|
||||
content: ' · ';
|
||||
font-weight: bold;
|
||||
}
|
||||
.linklist a:last-child:after {
|
||||
content: "";
|
||||
content: '';
|
||||
}
|
||||
.linklist a {
|
||||
white-space: nowrap;
|
||||
|
@ -569,11 +633,11 @@ span.user {
|
|||
clear: both;
|
||||
}
|
||||
.categories a:after {
|
||||
content: " | ";
|
||||
content: ' | ';
|
||||
font-weight: bold;
|
||||
}
|
||||
.categories a:last-child:after {
|
||||
content: "";
|
||||
content: '';
|
||||
}
|
||||
.pagefooter {
|
||||
padding: 1.5em 1.3em 2em;
|
||||
|
@ -615,15 +679,8 @@ span.user {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.tabsLeftx {
|
||||
background-color:#3590D5;
|
||||
background-color: #3590d5;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
@ -635,9 +692,7 @@ font-weight:bold;
|
|||
}
|
||||
|
||||
.active {
|
||||
border:1px solid #A7D7F9;
|
||||
|
||||
|
||||
border: 1px solid #a7d7f9;
|
||||
}
|
||||
|
||||
.bigLetter {
|
||||
|
@ -649,5 +704,8 @@ font-size:13pt;
|
|||
}
|
||||
|
||||
.article {
|
||||
min-height:500px;line-height:30px;border-right:1px solid #A7D7F9;padding-top:0px;
|
||||
min-height: 500px;
|
||||
line-height: 30px;
|
||||
border-right: 1px solid #a7d7f9;
|
||||
padding-top: 0px;
|
||||
}
|
|
@ -6,7 +6,10 @@ include 'NoDirectPhpAcess.php';
|
|||
include 'Header.php';
|
||||
?>
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> Initial commit for Bug197-Zayid: Add project files
|
||||
<br><br><br>
|
||||
|
||||
<div class="container">
|
||||
|
|
|
@ -4,7 +4,6 @@ include 'NoDirectPhpAcess.php';
|
|||
|
||||
<?php
|
||||
include 'Header.php';
|
||||
|
||||
?>
|
||||
|
||||
<br><br><br>
|
||||
|
|
|
@ -165,7 +165,6 @@ def test_student_with_valid_student_number_can_sign_up(driver, url, restore_data
|
|||
|
||||
|
||||
|
||||
|
||||
def test_student_with_invalid_student_number_cannot_sign_up(driver, url, restore_database):
|
||||
# Student with unrecognizable student number cannot sign up an account
|
||||
driver.get(url)
|
||||
|
@ -207,7 +206,6 @@ def test_student_with_weak_password_cannot_sign_up(driver, url, restore_database
|
|||
|
||||
|
||||
|
||||
|
||||
def test_student_can_join_course(driver, url, restore_database):
|
||||
# Student can join (CSC1111) - Project Management
|
||||
login(driver, url, '201825800050', '123')
|
||||
|
|
|
@ -12,44 +12,29 @@ def restore_database():
|
|||
Benefit: we can reproduce the same test result.
|
||||
'''
|
||||
|
||||
PASSWORD = 'lrr@123' # root password
|
||||
PASSWORD = 'p-@va9' # root password
|
||||
DB_NAME = 'lrr' # database name used for LRR
|
||||
HOST = 'localhost'
|
||||
PORT = 3909 # XAMPP MySQL default port
|
||||
SOCKET = '/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock' # XAMPP MySQL socket (optional)
|
||||
|
||||
# commands used to import data to DB_NAME
|
||||
cmds = [
|
||||
f'mysql -u root -p{PASSWORD} -h {HOST} -P {PORT} --socket={SOCKET} -e "DROP DATABASE IF EXISTS {DB_NAME};"',
|
||||
f'mysql -u root -p{PASSWORD} -h {HOST} -P {PORT} --socket={SOCKET} -e "CREATE DATABASE {DB_NAME};"',
|
||||
f'mysql -u root -p{PASSWORD} -h {HOST} -P {PORT} --socket={SOCKET} -e "CREATE USER IF NOT EXISTS \'lrr\'@\'localhost\' IDENTIFIED BY \'lrr@123\';"',
|
||||
f'mysql -u root -p{PASSWORD} -h {HOST} -P {PORT} --socket={SOCKET} -e "GRANT ALL PRIVILEGES ON {DB_NAME}.* TO lrr@localhost WITH GRANT OPTION;"',
|
||||
f'mysql -u root -p{PASSWORD} -h {HOST} -P {PORT} --socket={SOCKET} {DB_NAME} < ../../lrr_database_hui.sql'
|
||||
]
|
||||
try:
|
||||
f'mysql -u root -p{PASSWORD} -e "DROP DATABASE IF EXISTS {DB_NAME};"',
|
||||
f'mysql -u root -p{PASSWORD} -e "CREATE DATABASE {DB_NAME};"',
|
||||
f'mysql -u root -p{PASSWORD} -e "GRANT ALL PRIVILEGES ON {DB_NAME}.* TO lrr@localhost WITH GRANT OPTION;"',
|
||||
f'mysql -u root -p{PASSWORD} {DB_NAME} < ../lrr_database.sql']
|
||||
|
||||
for command in cmds:
|
||||
print(f"Executing command: {command}")
|
||||
result = os.system(command)
|
||||
if result != 0:
|
||||
raise Exception(f"Command failed with exit code {result}: {command}")
|
||||
print("Database restored successfully.")
|
||||
except Exception as e:
|
||||
print(f"An error occurred while restoring the database: {e}")
|
||||
os.system(command)
|
||||
return None
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def url():
|
||||
# return 'http://localhost/LRR/' # URL of LRR
|
||||
return 'http://localhost:8081/LRR-Hui-Organize/' # local URL of LRR-Hui-Organize
|
||||
return 'http://localhost/LRR/' # URL of LRR
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def driver():
|
||||
# Use the locally downloaded ChromeDriver
|
||||
chrome_driver_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../chromedriver-mac-x64 2/chromedriver'))
|
||||
print(f"Using ChromeDriver at: {chrome_driver_path}")
|
||||
driver = webdriver.Chrome(executable_path=chrome_driver_path)
|
||||
return driver
|
||||
return webdriver.Chrome()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
Loading…
Reference in New Issue