Skip to content

Commit

Permalink
Merge pull request #89 from ChoChihTun/master
Browse files Browse the repository at this point in the history
[V.13][T11-B1] Cho Chih Tun Googel Search Page and fix some errors
  • Loading branch information
yungyung04 authored Mar 25, 2018
2 parents 5f188cb + 3e9d8a8 commit 8f9e32f
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ matrix:

script: >-
./config/travis/run-checks.sh &&
travis_retry ./gradlew clean checkstyleMain checkstyleTest headless allTests coverage coveralls asciidoctor copyDummySearchPage
travis_retry ./gradlew clean checkstyleMain checkstyleTest headless allTests coverage coveralls asciidoctor
deploy:
skip_cleanup: true
Expand Down
5 changes: 0 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,6 @@ task deployOfflineDocs(type: Copy) {
}
}

task copyDummySearchPage(type: Copy) {
from 'docs/DummySearchPage.html'
into "${buildDir}/docs/html5"
}

deployOfflineDocs.dependsOn asciidoctor
processResources.dependsOn deployOfflineDocs

Expand Down
32 changes: 0 additions & 32 deletions docs/DummySearchPage.html

This file was deleted.

28 changes: 11 additions & 17 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<<<<<<< HEAD
= TuitionConnect - User Guide
=======
= TuitionConnect (TC) - User Guide
>>>>>>> 58ffc0c220cddca68ac2bfcc9faa4a6478744261
:toc:
:toc-title:
:toc-placement: preamble
Expand All @@ -21,11 +17,7 @@ By: `Team MarvelousBook` Since: `Feb 2018` Licence: `MIT`

== Introduction

<<<<<<< HEAD
TuitionConnect (AB4) is for those who *prefer to use a desktop app for managing contacts*. More importantly, TC is *optimized for those who prefer to work with a Command Line Interface* (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, TC can get your contact management tasks done faster than traditional GUI apps. Interested? Jump to the <<Quick Start>> to get started. Enjoy!
=======
TuitionConnect (TC) is for those who *prefer to use a desktop app for managing contacts*. More importantly, TC is *optimized for those who prefer to work with a Command Line Interface* (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, TC can get your contact management tasks done faster than traditional GUI apps. Interested? Jump to the <<Quick Start>> to get started. Enjoy!
>>>>>>> 58ffc0c220cddca68ac2bfcc9faa4a6478744261

== Quick Start

Expand Down Expand Up @@ -288,16 +280,10 @@ Format: `exit`
Address book data are saved in the hard disk automatically after any command that changes the data. +
There is no need to save manually.

=== Complete task `[coming in v1.2]`
Marks a task as completed. If the task is tuition, fees will automatically be added to the tutee's fee balance.
=== Edit task `[coming in v1.2]`
Edits date, time, duration or description of an existing task.
=== Delete task `[coming in v1.2]`
=== Delete task `[coming in v1.3]`
Deletes an existing task.

=== View task `[coming in v1.2]`
=== View task `[coming in v1.3]`
Views a list of tasks.

=== View sort `[coming in v1.2]`
Expand All @@ -307,9 +293,15 @@ Views a sorted list of people or task based on a user specified sorting criterio
Views the calender, which will display the month or week based on the user input.
When viewing in week, timeline of each day of the week will be shown and task in a specific time slot will be shown.

=== Update tutee fees `[coming in v1.3]`
=== Update tutee fees `[coming in v1.4]`
Updates the remaining balance of the fees of a specific tutee after he or she has paid.

=== Complete task `[coming in v2.0]`
Marks a task as completed. If the task is tuition, fees will automatically be added to the tutee's fee balance.

=== Edit task `[coming in v2.0]`
Edits date, time, duration or description of an existing task.

// tag::dataencryption[]
=== Encrypting data files `[coming in v2.0]`

Expand All @@ -326,6 +318,8 @@ _{explain how the user can enable/disable data encryption}_
Using Command Word: +
* *Add* `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]...` +
e.g. `add n/James Ho p/22224444 e/[email protected] a/123, Clementi Rd, 1234665 t/friend t/colleague` +
* *Add Tutee* `addtutee n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS s/SUBJECT g/GRADE edu/EDUCATION_LEVEL sch/SCHOOL [t/TAG]...` +
e.g. `add n/James Ho p/22224444 e/[email protected] a/123, Clementi Rd, 1234665 s/Mathematics g/A edu/junior college sch/National Junior College t/priority` +
* *Clear* : `clear` +
* *Delete* : `delete INDEX` +
e.g. `delete 3` +
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/seedu/address/model/AddressBook.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ private Person syncWithMasterTagList(Person person) {
personTags.forEach(tag -> correctTagReferences.add(masterTagObjects.get(tag)));

if (person instanceof Tutee) {
return new Tutee(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),
((Tutee) person).getSubject(), ((Tutee) person).getGrade(),
((Tutee) person).getEducationLevel(),
((Tutee) person).getSchool(), correctTagReferences);
return new Tutee(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(), (
(Tutee) person).getSubject(), ((Tutee) person).getGrade(), (
(Tutee) person).getEducationLevel(), (
(Tutee) person).getSchool(), correctTagReferences);
} else {
return new Person(
person.getName(), person.getPhone(), person.getEmail(), person.getAddress(), correctTagReferences);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/ui/BrowserPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class BrowserPanel extends UiPart<Region> {

public static final String DEFAULT_PAGE = "default.html";
public static final String SEARCH_PAGE_URL =
"https://se-edu.github.io/addressbook-level4/DummySearchPage.html?name=";
"http://www.google.com.sg/search?q=";

private static final String FXML = "BrowserPanel.fxml";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package seedu.address.logic.commands;

import static org.junit.Assert.assertEquals;
import static junit.framework.TestCase.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

Expand All @@ -11,7 +11,6 @@
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.ResolverStyle;

import java.util.ArrayList;

import org.junit.Rule;
Expand Down Expand Up @@ -40,42 +39,41 @@ public void constructor_nullTask_throwsNullPointerException() {
thrown.expect(NullPointerException.class);
new AddPersonalTaskCommand(null);
}
/**

@Test
public void execute_validPersonalTask_addSuccessful() throws Exception {
public void execute_validPersonalTask_addSuccessful() {
ArrayList<Task> taskListCopy = Schedule.getTaskList();
ArrayList<PersonalTask> personalTaskListCopy = PersonalSchedule.getPersonalTaskList();
PersonalTask task = new PersonalTask(taskDateTime, VALID_DURATION, VALID_TASK_DESC);

AddPersonalTaskCommand command = new AddPersonalTaskCommand(task);
CommandResult commandResult = command.execute();
CommandResult commandResult = command.executeUndoableCommand();

assertEquals(AddPersonalTaskCommand.MESSAGE_SUCCESS, commandResult.feedbackToUser);

* NullPointerException thrown. Do you know what's wrong?
//taskList should be updated
taskListCopy.add(task);
assertEquals(taskListCopy, Schedule.getTaskList());

//personalTaskList should be updated
personalTaskListCopy.add(task);
assertEquals(personalTaskListCopy, PersonalSchedule.getPersonalTaskList());
}
*/

@Test
public void equals() {
LocalDateTime taskDateTime2 = LocalDateTime.parse("08/08/1988 18:00", formatter);
PersonalTask task2 = new PersonalTask(taskDateTime2, VALID_DURATION, VALID_TASK_DESC);

AddPersonalTaskCommand addFirstTask = new AddPersonalTaskCommand(task);
AddPersonalTaskCommand addFirstTaskcopy = new AddPersonalTaskCommand(task);
AddPersonalTaskCommand addFirstTaskCopy = new AddPersonalTaskCommand(task);
AddPersonalTaskCommand addSecondTask = new AddPersonalTaskCommand(task2);

// same object -> returns true
assertTrue(addFirstTask.equals(addFirstTask));

// same values -> returns true
assertTrue(addFirstTask.equals(addFirstTaskcopy));
assertTrue(addFirstTask.equals(addFirstTaskCopy));

// different types -> returns false
assertFalse(addFirstTask.equals(1));
Expand Down

0 comments on commit 8f9e32f

Please sign in to comment.