This repository has been archived by the owner on May 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 110
WIP: #630: Create tests for talkeditor.py following PR #605 #631
Open
benbuckley
wants to merge
18
commits into
Freeseer:master
Choose a base branch
from
benbuckley:630-talkeditor-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1c09fc3
Insert comment on new tests
benbuckley b188481
Add non-functional test functions for click_add_talk, show_save_promp…
benbuckley 9a39350
Remove unnecessary comments
benbuckley 3a68abe
Added some comment to test_click_add_talk.py
benbuckley 99b2cb7
Add singleShot test to test_click_add_talk
benbuckley bc91a2f
Remove whitespace
benbuckley 5d8d416
Comment out glitchy test
benbuckley 9dbf6a5
Add SavePromptWidget.py file
benbuckley f94dfbe
Add test SavePromptWidget to talk editor
benbuckley 8b87039
Remove unused modules
benbuckley 4ad9dfc
Refactor talkeditor save prompts
benbuckley d87498f
Clean up talkeditor.py refactor
benbuckley 2f441f2
Refactor new talk window to remove exec_() method
benbuckley 798c191
Test opening and closing of new talk widget in talk editor
benbuckley d39dd04
Refactor methods that use booleans heavily
benbuckley 06014fb
Add unit test for click_add_tak
benbuckley 1f96571
Creaste list of fields in init function
benbuckley 1023f86
Clean up save prompt window
benbuckley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/python | ||
# -*- coding: utf-8 -*- | ||
|
||
# freeseer - vga/presentation capture software | ||
# | ||
# Copyright (C) 2014 Free and Open Source Software Learning Centre | ||
# http://fosslc.org | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
# For support, questions, suggestions or any other inquiries, visit: | ||
# http://wiki.github.com/Freeseer/freeseer/ | ||
|
||
from PyQt4.QtGui import QDialog | ||
from PyQt4.QtGui import QHBoxLayout | ||
from PyQt4.QtGui import QLabel | ||
from PyQt4.QtGui import QPushButton | ||
from PyQt4.QtGui import QSizePolicy | ||
from PyQt4.QtGui import QVBoxLayout | ||
|
||
|
||
class SavePromptWidget(QDialog): | ||
"""Dialog warning the user if there are unsaved changes to the current talk""" | ||
def __init__(self, parent=None): | ||
super(SavePromptWidget, self).__init__(parent) | ||
|
||
self.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum) | ||
|
||
self.layout = QVBoxLayout() | ||
self.setLayout(self.layout) | ||
|
||
self.bottomButtonLayout = QHBoxLayout() | ||
|
||
self.label = QLabel("The talk you were editing has unsaved changes.") | ||
self.saveButton = QPushButton('Save Changes') | ||
self.discardButton = QPushButton('Discard Changes') | ||
self.continueButton = QPushButton('Continue Editing') | ||
|
||
self.layout.addWidget(self.label) | ||
|
||
self.buttonLayout = QHBoxLayout() | ||
self.buttonLayout.addWidget(self.saveButton) | ||
self.buttonLayout.addWidget(self.discardButton) | ||
self.buttonLayout.addWidget(self.continueButton) | ||
|
||
self.layout.addLayout(self.buttonLayout) | ||
|
||
self.setWindowTitle("Unsaved Changes Exist") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be consistent with singe/double quotes. Double quotes are being used for this QLabel but single quotes for the QPushButtons below.