Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTL (Test > Levelbuilder): 8e817008 #27940

Merged
merged 76 commits into from
Apr 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
8ed9029
checks if video key contains a colon
nkiruka Mar 29, 2019
b3ff441
Redirect to dashboard teacher dashboard if user visits pegasus teache…
maddiedierker Apr 3, 2019
9fb123a
Remove teacherDashboardSplitTest script from new teacher dashboard
maddiedierker Apr 3, 2019
716db19
Delete teacherDashboardSplitTest script
maddiedierker Apr 3, 2019
b4c9eaa
Remove experiment and scriptId param from scriptUrlForStudent
maddiedierker Apr 3, 2019
65ad725
Remove experiment and old teacher dashboard paths from teacherDashboa…
maddiedierker Apr 3, 2019
7e960c3
Update OwnedSectionsTable unit tests to point to dashboard teacher da…
maddiedierker Apr 3, 2019
7d467f4
Update StageLockDialog unit test to use dashboard teacher dashboard URL
maddiedierker Apr 3, 2019
f3f3fa5
Delete teacher-dashboard-react experiment
maddiedierker Apr 3, 2019
5ed7b92
Remove unused Section#teacher_dashboard_url method
maddiedierker Apr 3, 2019
26007d9
Delete teacher-dashboard/index.js and grunt entry
maddiedierker Apr 3, 2019
5f74109
Remove extra student name link from teacher panel for consistency
maddiedierker Apr 3, 2019
9af67e8
Update teacher dashboard helper method link and delete unused helper …
maddiedierker Apr 3, 2019
9a4f195
Move redirectTeacherDashboard functionality into method; return early…
maddiedierker Apr 3, 2019
b9242ca
Delete unnecessary printLoginCardsUrl helper method
maddiedierker Apr 4, 2019
afe9cb8
Prepend forward slash to path in teacherDashboardUrl helper if none s…
maddiedierker Apr 4, 2019
12e216e
Add clarifying comment
maddiedierker Apr 4, 2019
73313ae
Add video_key as column in the concepts table
bethanyaconnor Apr 4, 2019
37487a3
Update teacher_dashboard.feature to always go to new teacher dashboard
maddiedierker Apr 4, 2019
f5b324b
Update teacher dashboard UI tests to point to new teacher dashboard
maddiedierker Apr 4, 2019
c662674
rename setViewType to changeViewType
davidsbailey Apr 4, 2019
6f3da4a
rename setViewTypeNonThunk to setViewType
davidsbailey Apr 4, 2019
1e84e47
make all but ViewAsToggle use setViewType, not changeViewType
davidsbailey Apr 4, 2019
60f888a
remove dead code
davidsbailey Apr 4, 2019
00dcbf7
extract initViewAs from progress code
davidsbailey Apr 2, 2019
ab9d14b
remove seemingly unneeded setViewType call from queryUserProgress
davidsbailey Apr 4, 2019
9b217a4
Update UI test to check for correct URL in new teacher dashboard
maddiedierker Apr 4, 2019
3084f0d
add user_id to the lesson backlink on script level page
davidsbailey Apr 4, 2019
9227137
Add index on video_key
bethanyaconnor Apr 4, 2019
50e7b02
Use existing teacher-dashboard/index.js instead of redirectTeacherDas…
maddiedierker Apr 5, 2019
0756340
Implement throwOnConsole helpers without sinon
islemaster Apr 5, 2019
239baa1
add end-to-end test for teacher viewing student progress dropdown
davidsbailey Apr 5, 2019
e19e683
revise regex to explicitly allow only required video key names
nkiruka Apr 5, 2019
57b289e
code clean
nkiruka Apr 5, 2019
fbd0240
Add index annotation to model
bethanyaconnor Apr 5, 2019
506839d
Merge branch 'staging' into remove-teacher-dashboard-experiment
maddiedierker Apr 5, 2019
bdc7a53
Fix SetupChecklistTest
islemaster Apr 5, 2019
06769bf
Use async/await in SetupChecklistTest
islemaster Apr 5, 2019
80315c9
Use reconfiguredChai in SetupChecklistTest
islemaster Apr 5, 2019
9e46cd9
Fix line item in confirmation email. Fix survey link in orange box in…
hacodeorg Apr 5, 2019
7b46b0c
remove bogus ui test step
davidsbailey Apr 5, 2019
d1ee79f
Make sure web lab loads fully before we take eyes capture
dmcavoy Apr 5, 2019
9602b98
only increase read/open timeouts in slow browsers
wjordan Apr 5, 2019
dc07613
Fix TeacherSectionsReduxTest
islemaster Apr 5, 2019
7879f6c
Wait for iframe before switching
dmcavoy Apr 5, 2019
bc6d779
Scroll elements into view before typing into element input
maddiedierker Apr 5, 2019
ae03363
Update weblab.feature test to wait for full load of weblab area
dmcavoy Apr 5, 2019
d0623db
Add new flex categories for CSP
dmcavoy Apr 5, 2019
3bc80be
Merge pull request #27901 from code-dot-org/ha/fix-csf
hacodeorg Apr 5, 2019
64d2af3
update eyes_selenium and selenium_webdriver gems
wjordan Apr 5, 2019
bf36e3e
Merge pull request #27886 from code-dot-org/change-view-type
davidsbailey Apr 5, 2019
99dcd19
Merge pull request #27905 from code-dot-org/plc-ui-test-fix
Apr 5, 2019
5eccdbf
Merge pull request #27903 from code-dot-org/update-csp-instruction-eyes
dmcavoy Apr 5, 2019
cf5a0ed
Merge branch 'staging' into remove-teacher-dashboard-experiment
maddiedierker Apr 5, 2019
ec93dde
Merge pull request #27912 from code-dot-org/staging
deploy-code-org Apr 5, 2019
e4e9dd1
fix match images
davidsbailey Apr 5, 2019
8768f1d
Merge pull request #27893 from code-dot-org/throwonconsole-without-sinon
islemaster Apr 5, 2019
3ab22d0
Merge pull request #27882 from code-dot-org/concept-videos-part-1
bethanyaconnor Apr 5, 2019
9c43bcd
Merge pull request #27908 from code-dot-org/selenium-eyes-upgrade
wjordan Apr 5, 2019
568fb09
Update schema cache dump after schema changes.
deploy-code-org Apr 5, 2019
8e5693a
Merge pull request #27906 from code-dot-org/flex-categories-csp
dmcavoy Apr 6, 2019
5be53cc
Merge pull request #27918 from code-dot-org/lg-match-images
davidsbailey Apr 7, 2019
17e0f60
upgrade nokogiri to 1.10.2
wjordan Apr 7, 2019
3475668
Merge pull request #27919 from code-dot-org/nokogiri-1.10.2
wjordan Apr 7, 2019
5223118
Merge pull request #27920 from code-dot-org/staging
deploy-code-org Apr 7, 2019
fe83d4f
Temporarily disable flakey feedback_tab_eyes.feature test
joshlory Apr 7, 2019
2d6e372
Merge pull request #27922 from code-dot-org/disable-feedback-eyes-test
joshlory Apr 7, 2019
6755725
Merge pull request #27926 from code-dot-org/test
joshlory Apr 8, 2019
4376113
Merge pull request #27927 from code-dot-org/staging
deploy-code-org Apr 8, 2019
0e646f8
Merge pull request #27868 from code-dot-org/remove-teacher-dashboard-…
Apr 8, 2019
cbb7b76
Merge pull request #27782 from code-dot-org/check-for-colons-video-key
nkiruka Apr 8, 2019
e339904
Merge pull request #27929 from code-dot-org/staging
deploy-code-org Apr 8, 2019
5d8c4c0
Merge pull request #27921 from code-dot-org/ui-http-timeout
wjordan Apr 8, 2019
ee90ae5
Merge pull request #27932 from code-dot-org/levelbuilder
deploy-code-org Apr 8, 2019
e13cb37
Update dsls.en.yml
deploy-code-org Apr 8, 2019
8e81700
Merge pull request #27935 from code-dot-org/staging
deploy-code-org Apr 8, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ group :development, :test do
# For UI testing.
gem 'chromedriver-helper', '~> 0.0.7'
gem 'cucumber'
gem 'eyes_selenium', '3.14.2'
gem 'eyes_selenium'
gem 'minitest', '~> 5.5'
gem 'minitest-around'
gem 'minitest-reporters', '~> 1.2.0.beta3'
gem 'net-http-persistent'
gem 'rinku'
gem 'rspec'
gem 'selenium-webdriver', '3.8.0'
gem 'selenium-webdriver'
gem 'spring'
gem 'spring-commands-testunit'

Expand Down Expand Up @@ -185,7 +185,7 @@ gem 'haml', github: 'wjordan/haml', ref: 'cdo'

gem 'jquery-ui-rails', '~> 6.0.1'

gem 'nokogiri', '~> 1.8.2'
gem 'nokogiri', '>= 1.10.0'

gem 'highline', '~> 1.6.21'

Expand Down
43 changes: 17 additions & 26 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -337,14 +337,7 @@ GEM
brakeman (4.3.1)
builder (3.2.3)
cancancan (1.15.0)
capybara (2.17.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (>= 2.0, < 4.0)
childprocess (0.8.0)
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
chromedriver-helper (0.0.9)
archive-zip (~> 0.7.0)
Expand All @@ -370,6 +363,8 @@ GEM
crack (0.4.3)
safe_yaml (~> 1.0.0)
crass (1.0.4)
css_parser (1.7.0)
addressable
cucumber (3.1.1)
builder (>= 2.1.2)
cucumber-core (~> 3.1.0)
Expand Down Expand Up @@ -410,16 +405,15 @@ GEM
eventmachine (1.2.5)
execjs (2.7.0)
exifr (1.2.5)
eyes_core (3.14.2)
eyes_core (3.14.10)
chunky_png (= 1.3.6)
faraday
oily_png (~> 1.2)
oj
eyes_selenium (3.14.2)
capybara
eyes_core (= 3.14.2)
eyes_selenium (3.14.10)
css_parser
eyes_core (= 3.14.10)
selenium-webdriver
watir
factory_girl (4.7.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.7.0)
Expand Down Expand Up @@ -543,7 +537,7 @@ GEM
mime-types-data (3.2018.0812)
mini_magick (4.5.1)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
mini_portile2 (2.4.0)
minitest (5.11.3)
minitest-around (0.4.1)
minitest (~> 5.0)
Expand All @@ -562,15 +556,16 @@ GEM
mysql2 (0.5.2)
nakayoshi_fork (0.0.4)
naturally (2.1.0)
net-http-persistent (2.9.4)
net-http-persistent (3.0.0)
connection_pool (~> 2.2)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (3.2.0)
netrc (0.11.0)
newrelic_rpm (4.8.0.341)
nio4r (2.3.1)
nokogiri (1.8.4)
mini_portile2 (~> 2.3.0)
nokogiri (1.10.2)
mini_portile2 (~> 2.4.0)
oauth (0.5.1)
oauth2 (1.4.1)
faraday (>= 0.8, < 0.16.0)
Expand Down Expand Up @@ -765,9 +760,9 @@ GEM
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
selenium-webdriver (3.8.0)
selenium-webdriver (3.141.0)
childprocess (~> 0.5)
rubyzip (~> 1.0)
rubyzip (~> 1.2, >= 1.2.2)
sequel (5.9.0)
sexp_processor (4.10.1)
shotgun (0.9.1)
Expand Down Expand Up @@ -850,8 +845,6 @@ GEM
vcr (3.0.3)
warden (1.2.7)
rack (>= 1.0)
watir (6.10.3)
selenium-webdriver (~> 3.4, >= 3.4.1)
web-console (3.3.1)
actionview (>= 5.0)
activemodel (>= 5.0)
Expand All @@ -868,8 +861,6 @@ GEM
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
xpath (2.1.0)
nokogiri (~> 1.3)
xxhash (0.4.0)
youtube-dl.rb (0.3.1.2016.08.19)
cocaine (>= 0.5.4)
Expand Down Expand Up @@ -920,7 +911,7 @@ DEPENDENCIES
devise (~> 4.4.0)
devise_invitable (~> 1.6.0)
execjs
eyes_selenium (= 3.14.2)
eyes_selenium
factory_girl_rails
fake_sqs
fakeredis
Expand Down Expand Up @@ -970,7 +961,7 @@ DEPENDENCIES
net-scp
net-ssh
newrelic_rpm (~> 4.8.0)
nokogiri (~> 1.8.2)
nokogiri (>= 1.10.0)
octokit
oj
omniauth-clever (~> 1.2.1)!
Expand Down Expand Up @@ -1021,7 +1012,7 @@ DEPENDENCIES
scss_lint
sdoc
seamless_database_pool!
selenium-webdriver (= 3.8.0)
selenium-webdriver
sequel
shotgun
simplecov (~> 0.9)
Expand Down
14 changes: 7 additions & 7 deletions apps/src/code-studio/components/progress/ViewAsToggle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react';
import {connect} from 'react-redux';
import commonMsg from '@cdo/locale';
import ToggleGroup from '@cdo/apps/templates/ToggleGroup';
import {ViewType, setViewType} from '../../viewAsRedux';
import {ViewType, changeViewType} from '../../viewAsRedux';
import {queryParams, updateQueryParam} from '@cdo/apps/code-studio/utils';

const styles = {
Expand All @@ -27,7 +27,7 @@ const styles = {
class ViewAsToggle extends React.Component {
static propTypes = {
viewAs: PropTypes.oneOf(Object.values(ViewType)).isRequired,
setViewType: PropTypes.func.isRequired
changeViewType: PropTypes.func.isRequired
};

componentDidMount() {
Expand All @@ -38,12 +38,12 @@ class ViewAsToggle extends React.Component {
}

onChange = viewType => {
const {setViewType} = this.props;
const {changeViewType} = this.props;

updateQueryParam('viewAs', viewType);

if (viewType === ViewType.Student && queryParams('user_id')) {
// In this case, the setViewType thunk is going to do a reload and we dont
// In this case, the changeViewType thunk is going to do a reload and we dont
// want to change our UI.
} else {
// Ideally all the things we would want to hide would be redux backed, and
Expand All @@ -52,7 +52,7 @@ class ViewAsToggle extends React.Component {
$('.hide-as-student').toggle(viewType === ViewType.Teacher);
}

setViewType(viewType);
changeViewType(viewType);
};

render() {
Expand Down Expand Up @@ -90,8 +90,8 @@ export default connect(
viewAs: state.viewAs
}),
dispatch => ({
setViewType(viewAs) {
dispatch(setViewType(viewAs));
changeViewType(viewAs) {
dispatch(changeViewType(viewAs));
}
})
)(UnconnectedViewAsToggle);
34 changes: 14 additions & 20 deletions apps/src/code-studio/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ progress.renderStageProgress = function(
progress.renderCourseProgress = function(scriptData) {
const store = getStore();
initializeStoreWithProgress(store, scriptData, null, true);

if (scriptData.student_detail_progress_view) {
store.dispatch(setStudentDefaultsSummaryView(false));
}
initViewAs(store, scriptData);
queryUserProgress(store, scriptData, null);

const teacherResources = (scriptData.teacher_resources || []).map(
Expand Down Expand Up @@ -213,24 +218,22 @@ progress.renderMiniView = function(
});
};

/**
* Query the server for user_progress data for this script, and update the store
* as appropriate
*/
function queryUserProgress(store, scriptData, currentLevelId) {
const onOverviewPage = !currentLevelId;

if (scriptData.student_detail_progress_view) {
store.dispatch(setStudentDefaultsSummaryView(false));
}

function initViewAs(store, scriptData) {
// Set our initial view type from current user's user_type or our query string.
let initialViewAs = ViewType.Student;
if (scriptData.user_type === 'teacher') {
const query = queryString.parse(location.search);
initialViewAs = query.viewAs || ViewType.Teacher;
}
store.dispatch(setViewType(initialViewAs));
}

/**
* Query the server for user_progress data for this script, and update the store
* as appropriate
*/
function queryUserProgress(store, scriptData, currentLevelId) {
const onOverviewPage = !currentLevelId;

$.ajax('/api/user_progress/' + scriptData.name, {
data: {
Expand Down Expand Up @@ -271,15 +274,6 @@ function queryUserProgress(store, scriptData, currentLevelId) {

store.dispatch(showTeacherInfo());

const viewAs =
queryString.parse(location.search).viewAs || ViewType.Teacher;
if (viewAs !== initialViewAs) {
// We don't want to redispatch if our viewAs is the same as the initial
// one, since the user might have manually changed the view while making
// our async call
store.dispatch(setViewType(viewAs));
}

renderTeacherPanel(store, scriptData.id, scriptData.section);
}

Expand Down
10 changes: 3 additions & 7 deletions apps/src/code-studio/viewAsRedux.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ export const ViewType = makeEnum('Student', 'Teacher');
// Action types
export const SET_VIEW_TYPE = 'viewAs/SET_VIEW_TYPE';

/**
* Stage lock reducer
*/
export default function reducer(state = ViewType.Student, action) {
if (action.type === SET_VIEW_TYPE) {
const viewType = action.viewType;
Expand All @@ -29,13 +26,12 @@ export default function reducer(state = ViewType.Student, action) {

// Action creators

// Exported for test purposes
export const setViewTypeNonThunk = viewType => ({
export const setViewType = viewType => ({
type: SET_VIEW_TYPE,
viewType
});

export const setViewType = viewType => {
export const changeViewType = viewType => {
return dispatch => {
// If changing to viewAs student while we are a particular student, remove
// the user_id and do a reload so that we're instead viewing as a generic
Expand All @@ -47,6 +43,6 @@ export const setViewType = viewType => {
return;
}

dispatch(setViewTypeNonThunk(viewType));
dispatch(setViewType(viewType));
};
};