Skip to content
This repository was archived by the owner on Aug 21, 2018. It is now read-only.

Commit

Permalink
Merge branch 'dev' into 1047-MemCourseCommunityList
Browse files Browse the repository at this point in the history
  • Loading branch information
razu9861 authored Oct 27, 2017
2 parents 8bbd268 + 4fea9a1 commit 0e644a5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
14 changes: 10 additions & 4 deletions app/MyApp/app/views/CourseMembers.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ $(function () {
memberProgress.fetch({
async: false,
success: function(res){
console.log(res)
member_list = []
if(res.length > 0){
for(var i = 0; i < res.length; i++){
Expand All @@ -57,7 +56,6 @@ $(function () {
config.fetch({
async: false
})

var currentConfig = config.first().toJSON()
var code = currentConfig.rows[0].doc.code
var na = currentConfig.rows[0].doc.nationName.substring(3,5);
Expand All @@ -84,7 +82,11 @@ $(function () {
attchmentURL = attchmentURL + _.keys(mems.get('_attachments'))[0]
src = attchmentURL
}
viewtext += '<tr><td><img width="45px" height="45px" src="' + src + '"/></td><td>' + mems.get('firstName') + ' ' + mems.get('lastName') + '</td><td>'+roleOfMem+'</td><td>'+ mems.get('community') +'</td><td><input type="checkbox" name="courseMember" value="' + mail + '">'+App.languageDict.attributes.Send_Email+'</td>'
if(config.models[0].attributes.rows[0].doc.type == 'nation' && mems.get("community") == 'nationbell' || config.models[0].attributes.rows[0].doc.type == 'community'){
viewtext += '<tr><td><img width="45px" height="45px" src="' + src + '"/></td><td>' + mems.get('firstName') + ' ' + mems.get('lastName') + '</td><td>'+roleOfMem+'</td><td>'+ mems.get('community') +'</td><td><input type="checkbox" name="courseMember" value="' + mail + '">'+App.languageDict.attributes.Send_Email+'</td>'
} else {
viewtext += '<tr><td><img width="45px" height="45px" src="' + src + '"/></td><td>' + mems.get('firstName') + ' ' + mems.get('lastName') + '</td><td>'+roleOfMem+'</td><td></td>'
}
var loggedIn = new App.Models.Member({
"_id": $.cookie('Member._id')
})
Expand Down Expand Up @@ -181,7 +183,11 @@ $(function () {
attchmentURL = attchmentURL + _.keys(mems.get('_attachments'))[0]
src = attchmentURL
}
viewtext += '<tr><td><img width="45px" height="45px" src="' + src + '"/></td><td>' + mems.get('firstName') + ' ' + mems.get('lastName') + '</td><td>'+roleOfMem+'</td><td><input type="checkbox" name="courseMember" value="' + mail + '">'+App.languageDict.attributes.Send_Email+'</td>'
if(config.models[0].attributes.rows[0].doc.type == 'nation' && mems.get("community") == 'nationbell'){
viewtext += '<tr><td><img width="45px" height="45px" src="' + src + '"/></td><td>' + mems.get('firstName') + ' ' + mems.get('lastName') + '</td><td>'+roleOfMem+'</td><td><input type="checkbox" name="courseMember" value="' + mail + '">'+App.languageDict.attributes.Send_Email+'</td>'
} else{
viewtext += '<tr><td><img width="45px" height="45px" src="' + src + '"/></td><td>' + mems.get('firstName') + ' ' + mems.get('lastName') + '</td><td>'+roleOfMem+'</td><td></td>'
}
var loggedIn = new App.Models.Member({
"_id": $.cookie('Member._id')
})
Expand Down
6 changes: 2 additions & 4 deletions tests/language_tset.js → tests/language_test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference path="./steps.d.ts" />
Feature('Language', { retries: 3 });
var languages = [
{ lan: "Spanish", log: "Iniciar sesión" },
{ lan: "Español", log: "Iniciar sesión" },
{ lan: "English", log: "Login" },
{ lan: "Arabic", log: "دخول" },
{ lan: "Urdu", log: "لاگ ان" }
Expand All @@ -14,9 +14,7 @@ Scenario('Test for Language Selection', (I) => {
// Removing this wait will cause the test to hang on occasion.
I.wait(1);
I.selectOption('//*[@id="onLoginLanguage"]', item.lan);
I.waitForStalenessOf("//*[contains(@id, 'login')]", 2);

I.waitForElement("//*[contains(@id, 'login')]", 10);
I.waitForStalenessOf("//*[contains(@id, '#login')]", 2);
I.see(item.log);
});
});
4 changes: 2 additions & 2 deletions tests/report_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ Scenario('Test for Add Report', (I) => {
I.waitForEnabled(ActReport);
I.click(ActReport);
I.wait(5)
I.seeInCurrentUrl('#logreports');
I.seeInCurrentUrl('http://127.0.0.1:5981/apps/_design/bell/MyApp/index.html#logreports');
I.wait(2);
I.waitForVisible(dateVis);
I.fillField(startDt, sdate);
I.fillField(endDt, edate);
I.click(reportBtn);
I.seeInCurrentUrl('#logreports');
I.seeInCurrentUrl('http://127.0.0.1:5981/apps/_design/bell/MyApp/index.html#logreports');
I.wait(5);
I.amOnPage('http://127.0.0.1:5981/apps/_design/bell/MyApp/index.html#reports');
I.wait(2);
Expand Down

0 comments on commit 0e644a5

Please sign in to comment.