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

Progress Tab UI tests #23752

Merged
merged 9 commits into from
Jul 27, 2018
1 change: 1 addition & 0 deletions apps/src/templates/progress/ProgressBubble.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ class ProgressBubble extends React.Component {
style={style}
data-tip data-for={tooltipId}
aria-describedby={tooltipId}
className={"uitest-bubble"}
>
<div
style={{
Expand Down
2 changes: 1 addition & 1 deletion apps/src/templates/sectionProgress/ProgressBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class ProgressBox extends Component {
<div style={boxWithBorderStyle}>
<div style={incompleteLevels}/>
<div style={imperfectLevels}/>
<div style={perfectLevels}/>
<div className={"uitest-perfect-bar"} style={perfectLevels}/>
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions apps/src/templates/sectionProgress/ScriptSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default class ScriptSelector extends Component {
value={scriptId}
onChange={event => onChange(parseInt(event.target.value))}
style={dropdownStyles.dropdown}
id="uitest-course-dropdown"
>
{Object.keys(grouped).map((groupName, index) => (
<optgroup key={index} label={groupName}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class SectionProgressToggle extends React.Component {
<button value={ViewType.SUMMARY} style={styles.toggleButton}>
<FontAwesome icon="search-minus"/>
</button>
<button value={ViewType.DETAIL} style={styles.toggleButton}>
<button id={"uitest-toggle-detail-view"} value={ViewType.DETAIL} style={styles.toggleButton}>
<FontAwesome icon="search-plus"/>
</button>
</ToggleGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class VirtualizedSummaryView extends Component {
styleTopRightGrid={progressStyles.topRight}
width={styleConstants['content-width']}
onScroll={onScroll}
id={"#uitest-summary-view"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove #

/>
</div>
);
Expand Down
41 changes: 41 additions & 0 deletions dashboard/test/ui/features/teacher_dashboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,47 @@ Feature: Using the teacher dashboard
Then I click selector "div.title:contains('Student Accounts and Progress')"
Then I wait until I am on "http://studio.code.org/home"

Scenario: Loading student progress
Given I create a teacher-associated student named "Sally"
And I give user "Teacher_Sally" hidden script access
And I complete the level on "http://studio.code.org/s/allthethings/stage/2/puzzle/1"
And I complete the free response on "http://studio.code.org/s/allthethings/stage/27/puzzle/1"
And I submit the assessment on "http://studio.code.org/s/allthethings/stage/33/puzzle/1"
And I sign out

# Progress tab
When I sign in as "Teacher_Sally"
And I am on "http://code.org/teacher-dashboard?no_home_redirect=1"
And I click selector "div.title:contains('Student Accounts and Progress')" once I see it
And I click selector "a:contains('New Section')" once I see it
And I wait until element "#uitest-course-dropdown" contains text "All the Things! *"
And I wait until element "#uitest-summary-view" is visible
And I click selector "#uitest-toggle-detail-view" once I see it
And I wait until element "#uitest-detail-view" is visible
And I wait until element "a[href*='/s/allthethings/stage/2/puzzle/1']" is in the DOM
# Completed bubble is green
Then element "a[href*='/s/allthethings/stage/2/puzzle/1'] .uitest-bubble" has css property "background-color" equal to "rgb(14, 190, 14)"
# Not started bubble is gray
Then element "a[href*='/s/allthethings/stage/2/puzzle/2'] .uitest-bubble" has css property "background-color" equal to "rgb(254, 254, 254)"

# Stats tab
And I click selector "#learn-tabs a:contains('Stats')" once I see it
And I wait until element "#uitest-stats-table" is visible

# Manage students tab
When I click selector "#learn-tabs a:contains('Manage Students')" once I see it
And I wait until element "#uitest-manage-tab" is visible
And I wait until element "#uitest-privacy-link" is visible
And element "#uitest-privacy-link" contains text "privacy document"

# Text responses tab
When I click selector "#learn-tabs a:contains('Text Responses')" once I see it
And I wait until element "#uitest-course-dropdown" is visible

# Assessments and surveys tab
When I click selector "#learn-tabs a:contains('Assessments/Surveys')" once I see it
And I wait until element "#uitest-course-dropdown" is visible

Scenario: Loading section projects
Given I create a teacher-associated student named "Sally"
And I am on "http://studio.code.org/projects/applab"
Expand Down