Commit aedaadec authored by Boxiang Sun's avatar Boxiang Sun

erp5_slapos_tutorial: Add selenium test to slapos-Tutorial.Install.Slapos.Master.Comp.Root

parent 43120ae3
...@@ -137,7 +137,17 @@ PLAY RECAP ********************************************************************* ...@@ -137,7 +137,17 @@ PLAY RECAP *********************************************************************
<p>The following steps include accessing the ERP5 cloud engine interface &quot;underlying&quot; SlapOS to launch the ERP5 configurator plus activating email settings and portal alarms so that the SlapOS Dashboard can work as expected.</p> <p>The following steps include accessing the ERP5 cloud engine interface &quot;underlying&quot; SlapOS to launch the ERP5 configurator plus activating email settings and portal alarms so that the SlapOS Dashboard can work as expected.</p>
</details> </details>
</section> <test>
<table class="test" style="display: none;">
<tbody>
<tr>
<td>open</td>
<td>${base_url}/MailHost/manage_main</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</test></section>
<section> <section>
<h1>Access SlapOS Master ERP5 Interface</h1> <h1>Access SlapOS Master ERP5 Interface</h1>
...@@ -145,33 +155,51 @@ PLAY RECAP ********************************************************************* ...@@ -145,33 +155,51 @@ PLAY RECAP *********************************************************************
<details open="open"> <details open="open">
<p>Start by going to the URL (<code>https://[IPv4]</code>) provided and <b>append &quot;/erp5/&quot;</b> to the URL which will take you to directly to the ERP5 interface. Login with the username and password you have received when the installation of the Master finished (run <code>erp5-show -s</code> in the terminal).</p> <p>Start by going to the URL (<code>https://[IPv4]</code>) provided and <b>append &quot;/erp5/&quot;</b> to the URL which will take you to directly to the ERP5 interface. Login with the username and password you have received when the installation of the Master finished (run <code>erp5-show -s</code> in the terminal).</p>
</details> </details>
</section> <test>
<table class="test" style="display: none;">
<section> <tbody>
<h1>Configure Mailhost</h1> <tr>
<img alt="Zope Interface - Configure Mailhost" src="https://www.erp5.com/zope-Interface.Configure.Mailhost?format=png&amp;display=" /> <td>waitForTextPresent</td>
<details open="open"> <td>MailHost</td>
<p>In order for regular users to use the SlapOS Dashboard, registration is necessary and requires providing an <i>email address</i> (for verification and account activation). This in turn mandates configuration of mailhost and site information in the ERP5 cloud engine so that emails are correctly forwarded.</p> <td>&nbsp;</td>
</tr>
<p>Open <code>https://[IPv4]/erp5/MailHost/manage_main</code> to access the mail host configuration in the Zope interface (ERP5 is built on top of Zope). Add a SMTP mailhost and login/password for the alias under which an email should be forwarded/sent. Make sure the Port is also correctly set to your email provider&#39;s correct SMTP port. Click <i>Save changes</i> when done to continue.</p> </tbody>
</details> </table>
</section> </test></section>
<section> <section>
<h1>Update Email Sender</h1>
<img alt="Zope Interface - Configure Mail Sender" src="https://www.erp5.com/zope-Interface.Configure.Mail.Sender?format=png&amp;display=" />
<details open="open">
<p>Open <code>https://[IPv4]/erp5/manage_propertiesForm</code> and add the fields <i>email_from_name</i> and <i>email_from_address</i> to send emails from a valid sender and reduce the chance of emails being labelled as spam. Click <i>Save changes</i> to continue.</p>
</details>
</section>
<section> <section>
<h1>Activate Portal Alarms</h1> <h1>Activate Portal Alarms</h1>
<img alt="Zope Interface - Configure Portal Alarms" src="https://www.erp5.com/zope-Interface.Configure.Portal.Alarms?display=&amp;format=png" /> <img alt="Zope Interface - Configure Portal Alarms" src="https://www.erp5.com/zope-Interface.Configure.Portal.Alarms?display=&amp;format=png" />
<details open="open"> <details open="open">
<p>Open <code>https://[IPv4]/erp5/portal_alarms/manageAlarmNode</code> select an Alarm Node (<i>admin-0</i>), click <i>Change</i> and then click <i>Subscribe</i>.</p> <p>Open <code>https://[IPv4]/erp5/portal_alarms/manageAlarmNode</code> select an Alarm Node (<i>admin-0</i>), click <i>Change</i> and then click <i>Subscribe</i>.</p>
</details> </details>
</section> <test>
<table class="test" style="display: none;">
<tbody>
<tr>
<td>open</td>
<td>${base_url}/portal_alarms/manageAlarmNode</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name=&quot;alarmNode&quot;]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name=&quot;alarmNode&quot;]</td>
<td>1</td>
</tr>
<tr>
<td>click</td>
<td>//input[@value=&quot; Change &quot;]</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</test></section>
<section> <section>
<h1>Launch Configurator</h1> <h1>Launch Configurator</h1>
...@@ -227,7 +255,7 @@ PLAY RECAP ********************************************************************* ...@@ -227,7 +255,7 @@ PLAY RECAP *********************************************************************
<section> <section>
<h1>SlapOS Master ERP5 Homescreen</h1> <h1>SlapOS Master ERP5 Homescreen</h1>
<img alt="ERP5 Interface - Slapos Master ERP5 Homescreen" src="https://www.erp5.com/erp5-Interface.Slapos.Master.ERP5.Homescreen.Logout?format=png&amp;display=" /> <img alt="SlapOS Preference Setup" src="https://www.erp5.com/erp5-Interface.Slapos.Master.ERP5.Homescreen.Logout?format=png&amp;display=" />
<details open="open"> <details open="open">
<p>Back on the homescreen you can see the updated number of modules available after configuration. It is beyond the scope of the SlapOS documentation to introduce the ERP5 interface. However you will be able to find many elements in the list of modules which will be used through the SlapOS Dashboard (such as <i>Computers</i> or <i>Hosting Subscriptions</i> for example). The SlapOS Dashboard is also part of ERP5 and can be found in the <i>Web Sites</i> module (called <i>hostingjs</i>).</p> <p>Back on the homescreen you can see the updated number of modules available after configuration. It is beyond the scope of the SlapOS documentation to introduce the ERP5 interface. However you will be able to find many elements in the list of modules which will be used through the SlapOS Dashboard (such as <i>Computers</i> or <i>Hosting Subscriptions</i> for example). The SlapOS Dashboard is also part of ERP5 and can be found in the <i>Web Sites</i> module (called <i>hostingjs</i>).</p>
...@@ -235,6 +263,44 @@ PLAY RECAP ********************************************************************* ...@@ -235,6 +263,44 @@ PLAY RECAP *********************************************************************
</details> </details>
</section> </section>
<section>
<h1>SlapOS Master ERP5 Preference Setup</h1>
<img alt="ERP5 Interface - Slapos Master ERP5 Homescreen" src="https://www.erp5.com/erp5-Interface.Slapos.Master.ERP5.Preference.Credential.Setup?format=png&amp;display=" />
<details open="open">
<p>Before logout and&nbsp;create a first actual user of your SlapOS network by registering through the SlapOS Dashboard. We need to tick the&nbsp;box &quot;Automatic Approval of Person Credential Update&quot; and &quot;Automatic Call to Credential Request Alarm&quot; in the &quot;Credential&quot; tab of the slapos preference( The URL of this preference should be like&nbsp;<code>https://[IPv4]/erp5/portal_preferences/slapos_default_system_preference</code>). With this, you don&#39;t need to receive an email and click the activate link inside. The newly created user will get approved automatically. After this setup, then click &quot;Logout&quot; to redirect to the&nbsp;SlapOS Dashboard.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr>
<td>open</td>
<td>${base_url}/portal_preferences/slapos_default_system_preference/SystemPreference_viewCredential</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>click</td>
<td>//input[@name=&quot;field_my_preferred_credential_alarm_automatic_call&quot;]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>click</td>
<td>//input[@name=&quot;field_my_preferred_person_credential_update_automatic_approval&quot;]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@name=&quot;Base_edit:method&quot;]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>verifyPortalStatusMessage</td>
<td>Data updated.</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</test></section>
<section class="chapter"> <section class="chapter">
<h1>Create First User</h1> <h1>Create First User</h1>
...@@ -251,7 +317,112 @@ PLAY RECAP ********************************************************************* ...@@ -251,7 +317,112 @@ PLAY RECAP *********************************************************************
<details open="open"> <details open="open">
<p>Go to your SlapOS Master Dashboard (<code>[IPv4]/erp5/web_site_module/hostingjs/</code> - make sure to not forget the trailing slash). <b>Note</b>, that to register a new user through the SlapOS Dashboard, you need to be logged out of the underlying ERP5 interface. To start the login, click <i>Create New Account</i>.</p> <p>Go to your SlapOS Master Dashboard (<code>[IPv4]/erp5/web_site_module/hostingjs/</code> - make sure to not forget the trailing slash). <b>Note</b>, that to register a new user through the SlapOS Dashboard, you need to be logged out of the underlying ERP5 interface. To start the login, click <i>Create New Account</i>.</p>
</details> </details>
</section> <test> \n
<table class="test" style="display: none;">
<tbody>
<tr>
<td>open</td>
<td>${base_url}/web_site_module/hostingjs/</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Create New Account</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), &quot;Create New Account&quot;)]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name=&quot;first_name&quot;]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name=&quot;first_name&quot;]</td>
<td>John</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name=&quot;last_name&quot;]</td>
<td>Doe</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name=&quot;default_email_text&quot;]</td>
<td>xxx@nexedi.net</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name=&quot;reference&quot;]</td>
<td>john</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name=&quot;password&quot;]</td>
<td>Pass_1234</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name=&quot;password_confirmation&quot;]</td>
<td>Pass_1234</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name=&quot;career_subordination_title&quot;]</td>
<td>Sample Org</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name=&quot;default_telefone_text&quot;]</td>
<td>+33 123 456</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name=&quot;default_address_street_address&quot;]</td>
<td>Sample City</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name=&quot;default_address_zip_code&quot;]</td>
<td>123456</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name=&quot;default_address_city&quot;]</td>
<td>Sample City</td>
</tr>
<tr>
<td>select</td>
<td>//select[@name=&quot;default_address_region&quot;]</td>
<td>France</td>
</tr>
<tr>
<td>click</td>
<td>//input[@value=&quot;Register&quot;]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Credential Request Created.</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/Zuite_waitForActivities</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Done.</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</test></section>
<section> <section>
<h1>SlapOS Master - Register New User</h1> <h1>SlapOS Master - Register New User</h1>
...@@ -259,7 +430,67 @@ PLAY RECAP ********************************************************************* ...@@ -259,7 +430,67 @@ PLAY RECAP *********************************************************************
<details open="open"> <details open="open">
<p>Fill out all the required fields and click <i>Register New User</i>. You will receive a confirmation email to activate your account. Click on the activation link in this message to confirm your email address.</p> <p>Fill out all the required fields and click <i>Register New User</i>. You will receive a confirmation email to activate your account. Click on the activation link in this message to confirm your email address.</p>
</details> </details>
</section> <test>
<table class="test" style="display: none;">
<tbody>
<tr>
<td>open</td>
<td>${base_url}/credential_request_module/</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name=&quot;__ac_name&quot;]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name=&quot;__ac_name&quot;]</td>
<td>${base_user}</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name=&quot;__ac_password&quot;]</td>
<td>${base_password}</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@name=&quot;logged_in:method&quot;]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_site_module/hostingjs/</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name=&quot;__ac_name&quot;]</td>
<td>john</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name=&quot;__ac_name&quot;]</td>
<td>john</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name=&quot;__ac_password&quot;]</td>
<td>Pass_1234</td>
</tr>
<tr>
<td>click</td>
<td>//input[@value=&quot;Login&quot;]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Dashboard</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</test></section>
<section> <section>
<h1>SlapOS User - Activation Pending</h1> <h1>SlapOS User - Activation Pending</h1>
...@@ -315,3 +546,4 @@ PLAY RECAP ********************************************************************* ...@@ -315,3 +546,4 @@ PLAY RECAP *********************************************************************
<details open="open">&nbsp;</details> <details open="open">&nbsp;</details>
</section> </section>
</section>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment