Skip to content

Commit

Permalink
Merge pull request #631 from SlateFoundation/develop
Browse files Browse the repository at this point in the history
Release: v3.4.9
  • Loading branch information
themightychris authored Dec 18, 2021
2 parents c4ef36e + 522a1e0 commit e683f5e
Show file tree
Hide file tree
Showing 14 changed files with 302 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .holo/sources/slate.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[holosource]
url = "https://github.com/SlateFoundation/slate"
ref = "refs/tags/v2.16.12"
ref = "refs/tags/v2.17.1"
170 changes: 164 additions & 6 deletions cypress/fixtures/student-competency-calculations.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@
}
}
},
"student2":{
"ELA":{
"ELA.2":{
"baseline":"9",
"average":null,
"growth": "0",
"progress":"0"
},
"ELA.3":{
"baseline":"9",
"average":"9",
"growth": "0",
"progress":"33"
}
}
},
"student3": {
"ELA": {
"ELA.1": {
Expand All @@ -38,7 +54,7 @@
"ELA.2": {
"baseline": null,
"average": "7.3",
"growth": null,
"growth": "0",
"progress": "40"
},
"ELA.3": {
Expand All @@ -56,13 +72,13 @@
"ELA.5": {
"baseline": null,
"average": "7.4",
"growth": null,
"growth": "0",
"progress": "83"
},
"ELA.6": {
"baseline": null,
"average": "8",
"growth": null,
"growth": "0",
"progress": "33"
},
"ELA.7": {
Expand All @@ -82,7 +98,7 @@
"SS.2": {
"baseline": null,
"average": "8",
"growth": null,
"growth": "0",
"progress": "50"
}
},
Expand All @@ -102,7 +118,7 @@
"SCI.3": {
"baseline": "9.7",
"average": "7",
"growth": null,
"growth": "0",
"progress": "33"
},
"SCI.4": {
Expand All @@ -116,9 +132,151 @@
"HOS.4": {
"baseline": "9",
"average": "9.3",
"growth": null,
"growth": "0",
"progress": "100"
}
}
},
"student4":{
"ELA":{
"ELA.1":{
"baseline":null,
"average":"6",
"growth":"0" ,
"progress":"33"
},
"ELA.2":{
"baseline":null,
"average":"6",
"growth":"0" ,
"progress":"40"
},
"ELA.3":{
"baseline":null,
"average":"7",
"growth":"1" ,
"progress":"100"
},
"ELA.4":{
"baseline":null,
"average":"6.7",
"growth":"1" ,
"progress":"100"
},
"ELA.5":{
"baseline":null,
"average":"7",
"growth":"1" ,
"progress":"83"
},
"ELA.6":{
"baseline":null,
"average":"7",
"growth":"0" ,
"progress":"33"
},
"ELA.7":{
"baseline":null,
"average":"6.4",
"growth":"0",
"progress":"63"
}
},
"SCI":{
"SCI.1":{
"baseline":null,
"average":"6.6",
"growth":"0",
"progress":"38"
},
"SCI.3":{
"baseline":null,
"average":null,
"growth":"0",
"progress":"0"
}
},
"NGE":{
"NGE.1":{
"baseline":null,
"average":"9.4",
"growth":"-1.3",
"progress":"35"
}
},
"HOS":{
"HOS.1":{
"baseline":null,
"average":"9.1",
"growth":"0",
"progress":"45"
}
},
"HW":{
"HW.1":{
"baseline":null,
"average":"8",
"growth":"0",
"progress":"33"
},
"HW.2":{
"baseline":null,
"average":"8.4",
"growth":"0",
"progress":"42"
},
"HW.3":{
"baseline":null,
"average":"9.2",
"growth":"2.5",
"progress":"56"
}
}
},
"student5":{
"ELA":{
"ELA.1":{
"baseline":"5",
"average":"6.5",
"growth":"1.5",
"progress":"33"
},
"ELA.2":{
"baseline":"5",
"average":"7",
"growth":"2",
"progress":"40"
},
"ELA.3":{
"baseline":5,
"average":"8.2",
"growth":"3.2",
"progress":"100"
},
"ELA.4":{
"baseline":"5",
"average":"7.5",
"growth":"2.5",
"progress":"100"
},
"ELA.5":{
"baseline":"5",
"average":"7",
"growth":"2",
"progress":"83"
},
"ELA.6":{
"baseline":"5",
"average":"8",
"growth":"3",
"progress":"33"
},
"ELA.7":{
"baseline":"5",
"average":"6.2",
"growth":"1.3",
"progress":"63"
}
}
}
}
10 changes: 5 additions & 5 deletions cypress/integration/api/student-competencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ describe('/cbl/student-competencies API', () => {
expect(response).property('status').to.eq(200);
expect(response).property('body').to.be.an('object');
expect(response.body).property('success').to.be.true;
expect(response.body).property('total').to.eq(635);
expect(response.body).property('total').to.eq(643);
expect(response.body).property('limit').to.eq(0);
expect(response.body).property('data').to.be.an('array');
expect(response.body.data).to.have.length(635);
expect(response.body.data).to.have.length(643);
expect(response.body.data[0]).to.include({
ID: 635,
ID: 643,
Class: 'Slate\\CBL\\StudentCompetency',
Created: 1628468422,
Created: 1637588605,
CreatorID: 2,
StudentID: 6,
CompetencyID: 40,
CompetencyID: 32,
Level: 9,
EnteredVia: 'enrollment',
BaselineRating: null
Expand Down
12 changes: 6 additions & 6 deletions cypress/integration/login_admin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe.skip('Admin login test', () => {
describe('Admin login test', () => {

// load sample database before tests
before(() => {
Expand All @@ -10,15 +10,15 @@ describe.skip('Admin login test', () => {

// should be visible after Log In click
cy.get('#login-modal').should('not.be.visible');
cy.contains('Log In').click();
cy.get('.slate-omnibar.mobile-hidden').contains('Log In').click();
cy.get('#login-modal').should('be.visible');

// Should be hidden after cancel click
cy.get('#login-modal').contains('Cancel').click();
cy.get('#login-modal').should('not.be.visible');

// Should be hidden after X click
cy.contains('Log In').click();
cy.get('.slate-omnibar.mobile-hidden').contains('Log In').click();
cy.get('#login-modal').should('be.visible');
cy.get('.modal-close-button').click();
cy.get('#login-modal').should('not.be.visible');
Expand All @@ -28,7 +28,7 @@ describe.skip('Admin login test', () => {
cy.visit('/');

cy.get('#login-modal').should('not.be.visible');
cy.contains('Log In').click();
cy.get('.slate-omnibar.mobile-hidden').contains('Log In').click();

cy.focused()
.should('have.attr', 'name', '_LOGIN[username]')
Expand All @@ -48,9 +48,9 @@ describe.skip('Admin login test', () => {
cy.visit('/');

cy.get('#login-modal').should('not.be.visible');
cy.contains('Log In').click();
cy.get('.slate-omnibar.mobile-hidden').contains('Log In').click();

cy.contains('#login-modal').should('not.have.attr', 'display');
cy.get('#login-modal').should('not.have.attr', 'display');
cy.focused()
.should('have.attr', 'name', '_LOGIN[username]')
.type('admin')
Expand Down
8 changes: 4 additions & 4 deletions cypress/integration/student_compentencies.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe.skip('Teacher student competencies test', () => {
describe('Teacher student competencies test', () => {

// load sample database before tests
before(() => {
Expand Down Expand Up @@ -44,15 +44,15 @@ describe.skip('Teacher student competencies test', () => {
cy.get('#' + studentSelector.el.dom.id)
.click()
.focused()
.type('ELA');
.type('EXA');

// verify and click first element of picker dropdown
cy.get('#' + studentSelector.getPicker().id + ' .x-boundlist-item')
.contains('ELA-001')
.contains('Example School')
.click();

// verify hash updates
cy.location('hash').should('eq', '#ELA/section:ELA-001');
cy.location('hash').should('eq', '#ELA/group:example_school');

// verify content loads
cy.get('.slate-studentcompetencies-admin-grid').contains('Student Slate');
Expand Down
13 changes: 6 additions & 7 deletions cypress/integration/student_demonstrations_growth.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe.skip('Student competency growth calculation test', () => {
describe('Student competency growth calculation test', () => {

// load sample database before tests
before(() => {
Expand Down Expand Up @@ -46,17 +46,16 @@ describe.skip('Student competency growth calculation test', () => {
// ensure that API has loaded required data
cy.wait('@studentCompetencyData')
.its('status')
.should('be', 200)
.should('eq', 200)
.then(() => {

const studentCompetencySuffixes = Object.keys(growthCalculationsByStudent[studentUsername][studentContentArea]);
studentCompetencySuffixes.forEach(studentCompetencySuffix => {
const studentCompetencies = Object.keys(growthCalculationsByStudent[studentUsername][studentContentArea]);
studentCompetencies.forEach(studentCompetency => {
// ensure competency card elements have rendered
cy.get('li.slate-demonstrations-student-competencycard')
.then(() => {
const card = extQuerySelector(`slate-demonstrations-student-competencycard{getCompetency().get("Code")=="${studentContentArea}.${studentCompetencySuffix}"}`);

compareCompetencyValues(`${studentContentArea}.${studentCompetencySuffix}`, card.id, growthCalculationsByStudent[studentUsername][studentContentArea][studentCompetencySuffix]);
const card = extQuerySelector(`slate-demonstrations-student-competencycard{getCompetency().get("Code")=="${studentCompetency}"}`);
compareCompetencyValues(`${studentCompetency}`, card.id, growthCalculationsByStudent[studentUsername][studentContentArea][studentCompetency]);
});
});
});
Expand Down
Loading

0 comments on commit e683f5e

Please sign in to comment.