[Fat-develop] FAT/src/FAT.Web TestFixtureHelp.aspx,NONE,1.1 TestFixtureHelp.aspx.cs,NONE,1.1 TestFix
Brought to you by:
exortech
Update of /cvsroot/fat/FAT/src/FAT.Web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3930/src/FAT.Web Modified Files: Default.aspx Default.aspx.cs FAT.Web.csproj Added Files: TestFixtureHelp.aspx TestFixtureHelp.aspx.cs TestFixtureHelp.aspx.resx TestFixtureHelpPageModel.cs Log Message: Can now click on question mark gif next to selected fixture name to get a pop-up window giving help on available methods. --- NEW FILE: TestFixtureHelp.aspx --- <%@ Page language="c#" Codebehind="TestFixtureHelp.aspx.cs" AutoEventWireup="false" Inherits="FAT.Web.TestFixtureHelp" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>FAT Test Fixture Help</title> <link media="screen" href="FAT.css" type="text/css" rel="stylesheet"> </HEAD> <body> <asp:PlaceHolder id="fixtureHelp" runat="server"></asp:PlaceHolder> </body> </HTML> --- NEW FILE: TestFixtureHelp.aspx.cs --- using System; using System.Web.UI; using System.Web.UI.WebControls; namespace FAT.Web { public class TestFixtureHelp : Page { protected System.Web.UI.WebControls.Literal help; protected PlaceHolder fixtureHelp; private void Page_Load(object sender, EventArgs e) { TestFixtureHelpPageModel model = new TestFixtureHelpPageModel(); fixtureHelp.Controls.Add(model.CreateFixtureHelp(Request["fixture"])); } #region Web Form Designer generated code override protected void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); base.OnInit(e); } /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.Load += new System.EventHandler(this.Page_Load); } #endregion } } --- NEW FILE: TestFixtureHelp.aspx.resx --- <?xml version="1.0" encoding="utf-8" ?> <root> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="ResMimeType"> <value>text/microsoft-resx</value> </resheader> <resheader name="Version"> <value>1.0.0.0</value> </resheader> <resheader name="Reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="Writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> </root> --- NEW FILE: TestFixtureHelpPageModel.cs --- using FAT.Core; using FAT.Core.Configuration; using System; using System.Web.UI; namespace FAT.Web { public class TestFixtureHelpPageModel { private ITestFixtureLoader loader; private ITestFixtureHtmlFormatter formatter; public TestFixtureHelpPageModel() : this(ConfigurationFactory.Create()) {} public TestFixtureHelpPageModel(IConfiguration configuration) : this(new TestFixtureLoader(configuration), configuration.TestFixtureHtmlFormatter) {} public TestFixtureHelpPageModel(ITestFixtureLoader loader, ITestFixtureHtmlFormatter formatter) { this.loader = loader; this.formatter = formatter; } public Control CreateFixtureHelp(string fixture) { Type type = loader.GetType(fixture); return formatter.Format(type, fixture); } } } Index: Default.aspx =================================================================== RCS file: /cvsroot/fat/FAT/src/FAT.Web/Default.aspx,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Default.aspx 7 Feb 2004 18:11:32 -0000 1.4 --- Default.aspx 20 Feb 2004 17:56:50 -0000 1.5 *************** *** 1,9 **** - <%@ Register Tagprefix="FAT" Namespace="FAT.Web" Assembly="FAT.Web" %> <%@ Page language="c#" Codebehind="Default.aspx.cs" AutoEventWireup="false" Inherits="FAT.Web.Default" EnableSessionState=true %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>FAT Functional Acceptance Testing Framework</title> ! <link rel="stylesheet" href="FAT.css" media="screen" type="text/css"> </HEAD> <body> --- 1,18 ---- <%@ Page language="c#" Codebehind="Default.aspx.cs" AutoEventWireup="false" Inherits="FAT.Web.Default" EnableSessionState=true %> + <%@ Register Tagprefix="FAT" Namespace="FAT.Web" Assembly="FAT.Web" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>FAT Functional Acceptance Testing Framework</title> ! <link media="screen" href="FAT.css" type="text/css" rel="stylesheet"> ! <script> ! function openTestfixtureHelpWindow() { ! window.open('TestFixtureHelp.aspx' + '?fixture=' + getSelectedFixture(), 'Bob', 'width=400,height=400,resizable=yes,location=no'); ! } ! ! function getSelectedFixture() { ! return document.CreateTest.fixture.options[document.CreateTest.fixture.selectedIndex].text; ! } ! </script> </HEAD> <body> *************** *** 14,52 **** <table> <tr> ! <td colspan="3"><asp:Label id="instructions" runat="server">Enter the name of the story and then enter the test to be run.</asp:Label></td> </tr> <tr> <td><asp:Label id="testNameLabel" Runat="server">Test Name: </asp:Label></td> ! <td><asp:TextBox id="testName" runat="server" Width="500" /></td> ! <td><asp:Label ID="testNameWarning" Runat="server">*</asp:Label></td> </tr> <tr> ! <td><asp:Label id="fixtureLabel" Runat="server">Fixture: </asp:Label></td> ! <td><asp:DropDownList ID="fixture" Runat="server" Width="500" /></td> ! <td><asp:Label ID="fixtureWarning" Runat="server">*</asp:Label></td> </tr> <tr> ! <td valign="top"><asp:Label id="testLabel" Runat="server">Test: </asp:Label></td> ! <td><asp:TextBox id="test" runat="server" Rows="10" TextMode="MultiLine" Width="500" /></td> ! <td valign="top">*</td> </tr> <tr> ! <td valign="top"><asp:Label id="setUpLabel" Runat="server">SetUp: </asp:Label></td> ! <td><asp:TextBox id="setup" runat="server" Rows="4" TextMode="MultiLine" Width="500" /></td> ! <td valign="top">*</td> </tr> <tr> ! <td valign="top"><asp:Label id="tearDownLabel" Runat="server">TearDown: </asp:Label></td> ! <td><asp:TextBox id="teardown" runat="server" Rows="4" TextMode="MultiLine" Width="500" /></td> ! <td valign="top">*</td> </tr> <tr> <td></td> ! <td align="right"><asp:Button ID="run" Runat="server" Text="Run" /></td> <td></td> </tr> </table> <div id="resultsDiv"> ! <asp:PlaceHolder ID="results" Runat="server"></asp:PlaceHolder> </div> </form> --- 23,72 ---- <table> <tr> ! <td colSpan="3"><asp:Label id="instructions" runat="server">Enter the name of the story and then enter the test to be run.</asp:Label></td> </tr> <tr> <td><asp:Label id="testNameLabel" Runat="server">Test Name: </asp:Label></td> ! <td><asp:Textbox id="testName" runat="server" Width="500"></asp:Textbox></td> ! <td><asp:Label id="testNameWarning" Runat="server">*</asp:Label></td> </tr> <tr> ! <td> ! <table cellpadding="0" cellspacing="0"> ! <tr> ! <td><asp:Label id="fixtureLabel" Runat="server">Fixture: </asp:Label></td> ! <td> ! <asp:HyperLink OnClick="openTestfixtureHelpWindow()" runat="server" id="HyperLink1"> ! <asp:Image ImageAlign="Right" ImageUrl="images/QuestionMark.jpg" runat="server" /> ! </asp:HyperLink> ! </td> ! </tr> ! </table> ! </td> ! <td><asp:Dropdownlist id="fixture" Runat="server" Width="500"></asp:Dropdownlist></td> ! <td><asp:Label id="fixtureWarning" Runat="server">*</asp:Label></td> </tr> <tr> ! <td vAlign="top"><asp:Label id="testLabel" Runat="server">Test: </asp:Label></td> ! <td><asp:Textbox id="test" runat="server" Width="500" TextMode="MultiLine" Rows="10"></asp:Textbox></td> ! <td vAlign="top">*</td> </tr> <tr> ! <td vAlign="top"><asp:Label id="setUpLabel" Runat="server">SetUp: </asp:Label></td> ! <td><asp:Textbox id="setup" runat="server" Width="500" TextMode="MultiLine" Rows="4"></asp:Textbox></td> ! <td vAlign="top">*</td> </tr> <tr> ! <td vAlign="top"><asp:Label id="tearDownLabel" Runat="server">TearDown: </asp:Label></td> ! <td><asp:Textbox id="teardown" runat="server" Width="500" TextMode="MultiLine" Rows="4"></asp:Textbox></td> ! <td vAlign="top">*</td> </tr> <tr> <td></td> ! <td align="right"><asp:Button id="run" Runat="server" Text="Run"></asp:Button></td> <td></td> </tr> </table> <div id="resultsDiv"> ! <asp:Placeholder id="results" Runat="server"></asp:Placeholder> </div> </form> Index: Default.aspx.cs =================================================================== RCS file: /cvsroot/fat/FAT/src/FAT.Web/Default.aspx.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Default.aspx.cs 7 Feb 2004 18:11:32 -0000 1.4 --- Default.aspx.cs 20 Feb 2004 17:56:50 -0000 1.5 *************** *** 13,17 **** protected TextBox teardown; protected Label fixtureWarning; - protected Button run; protected Label testLabel; protected Label setUpLabel; --- 13,16 ---- *************** *** 21,26 **** --- 20,30 ---- protected Label testNameWarning; protected Label fixtureLabel; + + protected Button run; protected DropDownList fixture; protected PlaceHolder results; + protected ImageButton fixtureHelpImageButton; + protected System.Web.UI.WebControls.HyperLink HyperLink1; + private DefaultPageModel model = new DefaultPageModel(); Index: FAT.Web.csproj =================================================================== RCS file: /cvsroot/fat/FAT/src/FAT.Web/FAT.Web.csproj,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FAT.Web.csproj 3 Feb 2004 22:08:07 -0000 1.5 --- FAT.Web.csproj 20 Feb 2004 17:56:50 -0000 1.6 *************** *** 143,146 **** --- 143,167 ---- /> <File + RelPath = "TestFixtureHelp.aspx" + SubType = "Form" + BuildAction = "Content" + /> + <File + RelPath = "TestFixtureHelp.aspx.cs" + DependentUpon = "TestFixtureHelp.aspx" + SubType = "ASPXCodeBehind" + BuildAction = "Compile" + /> + <File + RelPath = "TestFixtureHelp.aspx.resx" + DependentUpon = "TestFixtureHelp.aspx.cs" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "TestFixtureHelpPageModel.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "TestTreeView.cs" SubType = "Code" *************** *** 249,252 **** --- 270,277 ---- /> <File + RelPath = "images\QuestionMark.jpg" + BuildAction = "Content" + /> + <File RelPath = "images\Red.jpg" BuildAction = "Content" |