-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 55da561. new file: ATestCodeFolder/grunt_test/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/LICENCE
- Loading branch information
fqs
committed
May 25, 2019
1 parent
55da561
commit bb18448
Showing
2,789 changed files
with
432,213 additions
and
0 deletions.
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,52 @@ | ||
# -*- coding: utf-8 -*- | ||
from selenium import webdriver | ||
from selenium.webdriver.common.by import By | ||
from selenium.webdriver.common.keys import Keys | ||
from selenium.webdriver.support.ui import Select | ||
from selenium.common.exceptions import NoSuchElementException | ||
from selenium.common.exceptions import NoAlertPresentException | ||
import unittest, time, re | ||
|
||
class Baidupython(unittest.TestCase): | ||
def setUp(self): | ||
self.driver = webdriver.Firefox() | ||
self.driver.implicitly_wait(30) | ||
self.base_url = "http://www.baidu.com/" | ||
self.verificationErrors = [] | ||
self.accept_next_alert = True | ||
|
||
def test_baidupython(self): | ||
driver = self.driver | ||
driver.get(self.base_url + "/") | ||
driver.find_element_by_id("kw").click() | ||
driver.find_element_by_id("kw").clear() | ||
driver.find_element_by_id("kw").send_keys("vx") | ||
driver.find_element_by_id("su").click() | ||
|
||
def is_element_present(self, how, what): | ||
try: self.driver.find_element(by=how, value=what) | ||
except NoSuchElementException, e: return False | ||
return True | ||
|
||
def is_alert_present(self): | ||
try: self.driver.switch_to_alert() | ||
except NoAlertPresentException, e: return False | ||
return True | ||
|
||
def close_alert_and_get_its_text(self): | ||
try: | ||
alert = self.driver.switch_to_alert() | ||
alert_text = alert.text | ||
if self.accept_next_alert: | ||
alert.accept() | ||
else: | ||
alert.dismiss() | ||
return alert_text | ||
finally: self.accept_next_alert = True | ||
|
||
def tearDown(self): | ||
self.driver.quit() | ||
self.assertEqual([], self.verificationErrors) | ||
|
||
if __name__ == "__main__": | ||
unittest.main() |
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,15 @@ | ||
{ | ||
"boss": true, // true: Tolerate assignments where comparisons would be expected | ||
"curly": true, // true: Require {} for every new block or scope | ||
"eqeqeq": true, // true: Require triple equals (===) for comparison | ||
"eqnull": true, // true: Tolerate use of `== null` | ||
"immed": true, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` | ||
"latedef": true, // true: Require variables/functions to be defined before being used | ||
"newcap": true, // true: Require capitalization of all constructor functions e.g. `new F()` | ||
"noarg": true, // true: Prohibit use of `arguments.caller` and `arguments.callee` | ||
"sub": true, // true: Tolerate using `[]` notation when it can still be expressed in dot notation | ||
"undef": true, // true: Require all non-global variables to be declared (prevents global leaks) | ||
"unused": true, | ||
"node": true, // Node.js | ||
"-W117": true // true: Ignore `not defined` errors as an example of using a rule (W117) by code. | ||
} |
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,29 @@ | ||
module.exports = function(grunt) { | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON("package.json"), | ||
uglify: { | ||
options:{ | ||
stripBanners: true, | ||
banner: '/*! <%=pkg.name%>-<%pkg.version%>.js <%=grunt.template.today("yyyy-mm-dd")%> */\n' | ||
}, | ||
my_target: { | ||
files: { | ||
'build/test.min.js': ['src/test.js'], | ||
'build/dijstra_core.min.js': ['src/dijstra_core.js'], | ||
} | ||
} | ||
}, | ||
jshint:{ | ||
build: [ 'Gruntfile.js', 'src/test.js' ], | ||
options: { | ||
jshintrc: '.jshintrc' | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
|
||
grunt.registerTask('default', ['jshint', 'uglify']); | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,2 @@ | ||
/*! grunttest-.js 2015-07-22 */ | ||
!function(a,b){function c(a,b){return a+b}c(10,100)}(window); |
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,2 @@ | ||
/*! grunttest-.js 2015-07-23 */ | ||
!function(a,b){function d(a,b){return a+b+c}d(10,100)}(window); |
142 changes: 142 additions & 0 deletions
142
ATestCodeFolder/grunt_test/node_modules/grunt-contrib-jshint/CHANGELOG
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.