Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7e1fab7
Showing
14 changed files
with
167 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,4 @@ | ||
*.gem | ||
.bundle | ||
Gemfile.lock | ||
pkg/* |
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,4 @@ | ||
source "http://rubygems.org" | ||
|
||
# Specify your gem's dependencies in iemodal.gemspec | ||
gemspec |
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 @@ | ||
require "bundler/gem_tasks" |
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,5 @@ | ||
default: DRIVER=WATIR --no-source --color --format pretty | ||
watir: DRIVER=WATIR --no-source --color --format pretty | ||
selenium: DRIVER=SELENIUM --no-source --color --format pretty | ||
autotest: DRIVER=WATIR --no-source --color --format pretty | ||
|
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 @@ | ||
<html> | ||
<head> | ||
<title>iemodal</title> | ||
</head> | ||
<body> | ||
|
||
<input id=launch_modal_button type=button | ||
onclick='window.showModalDialog( | ||
"modal_1.html", | ||
self, | ||
"status:no;resizable:Yes;help:no;maximize:no;minimize:no;scrollbars:no;"); return false;' | ||
value="Launch a modal" /> | ||
|
||
</body> | ||
</html> |
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,35 @@ | ||
<html> | ||
|
||
<head> | ||
<title>Modal</title> | ||
<script> | ||
function delay_action(other_function) | ||
{ | ||
setTimeout(other_function, 3000); | ||
} | ||
|
||
function close_window() | ||
{ | ||
self.close() | ||
} | ||
</script> | ||
</head> | ||
|
||
<body> | ||
|
||
<h2>Modal 1</h2> | ||
|
||
<h3>Close buttons</h3> | ||
<input id=close_window type=button onclick="close_window()" value="Close window"/> | ||
<input id=delayed_close type=button onclick="delay_action('close_window()')" value="Close window with delay" /> | ||
|
||
<h3>Nested modal</h3> | ||
<input id=launch_modal_button type=button | ||
onclick='window.showModalDialog( | ||
"modal_2.html", | ||
self, | ||
"status:no;resizable:Yes;help:no;maximize:no;minimize:no;scrollbars:no;"); return false;' | ||
value="Launch another modal"/> | ||
|
||
</body> | ||
</html> |
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,27 @@ | ||
<html> | ||
|
||
<head> | ||
<title>Modal 2</title> | ||
<script> | ||
function delay_action(other_function) | ||
{ | ||
setTimeout(other_function, 3000); | ||
} | ||
|
||
function close_window() | ||
{ | ||
self.close() | ||
} | ||
</script> | ||
</head> | ||
|
||
<body> | ||
|
||
<h2>Modal 2</h2> | ||
|
||
<h3>Close buttons</h3> | ||
<input id=close_window type="button" onclick="close_window()" value="Close window"/> | ||
<input id=delayed_close type=button onclick="delay_action('close_window()')" value="Close window with delay" /> | ||
|
||
</body> | ||
</html> |
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,10 @@ | ||
Feature: handing modal dialogs | ||
|
||
Background: | ||
Given I am on the static elements page | ||
|
||
|
||
Scenario: Interacting with a modal | ||
When I open a modal | ||
Then I should be able click a button to close the modal | ||
|
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,11 @@ | ||
Given /^I am on the static elements page$/ do | ||
pending # express the regexp above with the code you wish you had | ||
end | ||
|
||
When /^I open a modal$/ do | ||
pending # express the regexp above with the code you wish you had | ||
end | ||
|
||
Then /^I should be able click a button to close the modal$/ do | ||
pending # express the regexp above with the code you wish you had | ||
end |
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,5 @@ | ||
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '../../', 'lib')) | ||
|
||
require 'rspec/expectations' | ||
require 'watir-webdriver' | ||
require 'selenium-webdriver' |
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 @@ | ||
module UrlHelper | ||
class << self | ||
def html | ||
File.expand_path("#{File.dirname(__FILE__)}/../html") | ||
end | ||
|
||
def files | ||
"file://#{html}" | ||
end | ||
|
||
def main | ||
"#{files}/main.html" | ||
end | ||
end | ||
end |
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,27 @@ | ||
# -*- encoding: utf-8 -*- | ||
$:.push File.expand_path("../lib", __FILE__) | ||
require "iemodal/version" | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "iemodal" | ||
s.version = Iemodal::VERSION | ||
s.authors = ["Jeffrey S. Morgan"] | ||
s.email = ["jeff.morgan@leandog.com"] | ||
s.homepage = "" | ||
s.summary = %q{Makes it possible to interact with modal dialogs in Internet Explorer} | ||
s.description = %q{Makes it possible to interact with modal dialogs in Internet Explorer} | ||
|
||
s.rubyforge_project = "iemodal" | ||
|
||
s.files = `git ls-files`.split("\n") | ||
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") | ||
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } | ||
s.require_paths = ["lib"] | ||
|
||
s.add_dependency 'watir-webdriver', '>= 0.3.2' | ||
s.add_dependency 'selenium-webdriver', '>= 2.4.0' | ||
s.add_dependency 'page-object' | ||
|
||
s.add_development_dependency 'rspec', '>= 2.6.0' | ||
s.add_development_dependency 'cucumber', '>= 1.0.0' | ||
end |
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,5 @@ | ||
require "iemodal/version" | ||
|
||
module Iemodal | ||
# Your code goes here... | ||
end |
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,3 @@ | ||
module Iemodal | ||
VERSION = "0.0.1" | ||
end |