<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>_bind_names</string> </key>
            <value>
              <object>
                <klass>
                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
                </klass>
                <tuple/>
                <state>
                  <dictionary>
                    <item>
                        <key> <string>_asgns</string> </key>
                        <value>
                          <dictionary>
                            <item>
                                <key> <string>name_subpath</string> </key>
                                <value> <string>traverse_subpath</string> </value>
                            </item>
                          </dictionary>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>_text</string> </key>
            <value> <unicode encoding="cdata"><![CDATA[

<!-- Tested with chromium 12 and --ignore-certificate-errors --disable-translate --disable-web-security options -->\n
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
    xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>Test KVM</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">testkvm</td></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="container/Zuite_vifib_instanciation_macro_library/macros/init_environment" />\n
<tr>\n
  <td>phantomRender</td>\n
  <td>webrequest1.png</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>assertElementPresent</td>\n
  <td>link=Order a KVM now</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>clickAndWait</td>\n
  <td>link=Order a KVM now</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>phantomRender</td>\n
  <td>webrequest2.png</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>assertElementPresent</td>\n
  <td>//div[text()="Your instance is under creation. Please wait few minutes for partitions to appear."]</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>storeLocation</td>\n
  <td>hosting_subscription_url</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>echo</td>\n
  <td>${hosting_subscription_url}</td>\n
  <td></td>\n
</tr>\n
<!--\n
Unfortunately there is currently now way to do good client-server waiting for reindexation\n
of Software Instance, so just wait 60s.\n
\n
It shall be maximum of reindexation.\n
\n
-->\n
<tr>\n
  <td>pause</td>\n
  <td>60000</td>\n
  <td></td>\n
</tr>\n
\n
<tr>\n
  <td>open</td>\n
  <td>${hosting_subscription_url}</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>assertElementPresent</td>\n
  <td>link=Vifib KVM*</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>clickAndWait</td>\n
  <td>link=Vifib KVM*</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>storeLocation</td>\n
  <td>software_instance_url</td>\n
  <td></td>\n
</tr>\n
<!-- Allows to fetch clean instance status -->\n
<tr>\n
  <td>storeEval</td>\n
  <td>window.location.pathname</td>\n
  <td>software_instance_path</td>\n
</tr>\n
<tr>\n
  <td>echo</td>\n
  <td>${software_instance_path}</td>\n
  <td></td>\n
</tr>\n
\n
<!-- Hackish, but there is no other way to fetch software instance status -->\n
<!-- XXX: It is hammering server, needs to make it a bit nicer -->\n
<!--tr>\n
  <td>waitForCondition</td>\n
  <td>new\n
Ajax.Request(\'${software_instance_path}/SoftwareInstance_getStatus\',\n
{asynchronous: false}).transport.responseText === "Started"; var i;\n
for (i = 0; i < 10000000; i++) { };</td>\n
  <td>600000</td>\n
</tr-->\n
<tr>\n
  <td>pause</td>\n
  <td>1200000</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>open</td>\n
  <td>${software_instance_url}</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>assertElementPresent</td>\n
  <td>css=span:contains("Started")</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>assertElementPresent</td>\n
  <td>css=td:contains("url")</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>assertElementPresent</td>\n
  <td>css=td:contains("password")</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>storeText</td>\n
  <td>css=td:contains(\'url\') + td</td>\n
  <td>ip</td>\n
</tr>\n
<tr>\n
  <td>storeText</td>\n
  <td>css=td:contains(\'password\') + td</td>\n
  <td>password</td>\n
</tr>\n
<tr>\n
  <td>openAndWait</td>\n
  <td>${ip}</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>pause</td>\n
  <td>2000</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>assertElementPresent</td>\n
  <td>id=password_input</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>type</td>\n
  <td>id=password_input</td>\n
  <td>${password}</td>\n
</tr>\n
<tr>\n
  <td>keyPress</td>\n
  <td>id=password_input</td>\n
  <td>13</td>\n
</tr>\n
<!--Check if it works without it in chrome AND firefox before removing.\n
<tr>\n
  <td>pause</td>\n
  <td>1000</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>submit</td>\n
  <td>//input[@id=&quot;password_input&quot;]/..</td>\n
  <td>\\13</td>\n
</tr>-->\n
<tr>\n
  <td>pause</td>\n
  <td>10000</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>assertTextPresent</td>\n
  <td>Connected (encrypted) to</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>phantomRender</td>\n
  <td>webrequest9.png</td>\n
  <td></td>\n
</tr>\n
<tr>\n
  <td>openAndWait</td>\n
  <td>${software_instance_url}</td>\n
  <td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_vifib_instanciation_macro_library/macros/destroy_instance" />\n
</tbody>\n
</table>\n
</body>\n
</html>

]]></unicode> </value>
        </item>
        <item>
            <key> <string>content_type</string> </key>
            <value> <string>text/html</string> </value>
        </item>
        <item>
            <key> <string>expand</string> </key>
            <value> <int>0</int> </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>TestKVM</string> </value>
        </item>
        <item>
            <key> <string>output_encoding</string> </key>
            <value> <string>utf-8</string> </value>
        </item>
        <item>
            <key> <string>title</string> </key>
            <value> <unicode></unicode> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
