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

Commit 0e644a5

Browse files
authored
Merge branch 'dev' into 1047-MemCourseCommunityList
2 parents 8bbd268 + 4fea9a1 commit 0e644a5

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

app/MyApp/app/views/CourseMembers.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ $(function () {
4343
memberProgress.fetch({
4444
async: false,
4545
success: function(res){
46-
console.log(res)
4746
member_list = []
4847
if(res.length > 0){
4948
for(var i = 0; i < res.length; i++){
@@ -57,7 +56,6 @@ $(function () {
5756
config.fetch({
5857
async: false
5958
})
60-
6159
var currentConfig = config.first().toJSON()
6260
var code = currentConfig.rows[0].doc.code
6361
var na = currentConfig.rows[0].doc.nationName.substring(3,5);
@@ -84,7 +82,11 @@ $(function () {
8482
attchmentURL = attchmentURL + _.keys(mems.get('_attachments'))[0]
8583
src = attchmentURL
8684
}
87-
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>'
85+
if(config.models[0].attributes.rows[0].doc.type == 'nation' && mems.get("community") == 'nationbell' || config.models[0].attributes.rows[0].doc.type == 'community'){
86+
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>'
87+
} else {
88+
viewtext += '<tr><td><img width="45px" height="45px" src="' + src + '"/></td><td>' + mems.get('firstName') + ' ' + mems.get('lastName') + '</td><td>'+roleOfMem+'</td><td></td>'
89+
}
8890
var loggedIn = new App.Models.Member({
8991
"_id": $.cookie('Member._id')
9092
})
@@ -181,7 +183,11 @@ $(function () {
181183
attchmentURL = attchmentURL + _.keys(mems.get('_attachments'))[0]
182184
src = attchmentURL
183185
}
184-
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>'
186+
if(config.models[0].attributes.rows[0].doc.type == 'nation' && mems.get("community") == 'nationbell'){
187+
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>'
188+
} else{
189+
viewtext += '<tr><td><img width="45px" height="45px" src="' + src + '"/></td><td>' + mems.get('firstName') + ' ' + mems.get('lastName') + '</td><td>'+roleOfMem+'</td><td></td>'
190+
}
185191
var loggedIn = new App.Models.Member({
186192
"_id": $.cookie('Member._id')
187193
})

tests/language_tset.js renamed to tests/language_test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference path="./steps.d.ts" />
22
Feature('Language', { retries: 3 });
33
var languages = [
4-
{ lan: "Spanish", log: "Iniciar sesión" },
4+
{ lan: "Español", log: "Iniciar sesión" },
55
{ lan: "English", log: "Login" },
66
{ lan: "Arabic", log: "دخول" },
77
{ lan: "Urdu", log: "لاگ ان" }
@@ -14,9 +14,7 @@ Scenario('Test for Language Selection', (I) => {
1414
// Removing this wait will cause the test to hang on occasion.
1515
I.wait(1);
1616
I.selectOption('//*[@id="onLoginLanguage"]', item.lan);
17-
I.waitForStalenessOf("//*[contains(@id, 'login')]", 2);
18-
19-
I.waitForElement("//*[contains(@id, 'login')]", 10);
17+
I.waitForStalenessOf("//*[contains(@id, '#login')]", 2);
2018
I.see(item.log);
2119
});
2220
});

tests/report_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ Scenario('Test for Add Report', (I) => {
7676
I.waitForEnabled(ActReport);
7777
I.click(ActReport);
7878
I.wait(5)
79-
I.seeInCurrentUrl('#logreports');
79+
I.seeInCurrentUrl('http://127.0.0.1:5981/apps/_design/bell/MyApp/index.html#logreports');
8080
I.wait(2);
8181
I.waitForVisible(dateVis);
8282
I.fillField(startDt, sdate);
8383
I.fillField(endDt, edate);
8484
I.click(reportBtn);
85-
I.seeInCurrentUrl('#logreports');
85+
I.seeInCurrentUrl('http://127.0.0.1:5981/apps/_design/bell/MyApp/index.html#logreports');
8686
I.wait(5);
8787
I.amOnPage('http://127.0.0.1:5981/apps/_design/bell/MyApp/index.html#reports');
8888
I.wait(2);

0 commit comments

Comments
 (0)