mirror of
https://github.com/UniversityOfHelsinkiCS/ohtuilmo.git
synced 2026-10-12 19:03:41 +03:00
add e2e test for editing project length
This commit is contained in:
@@ -74,6 +74,15 @@ describe('Group Management Page', () => {
|
||||
cy.get('.group-name').eq(0).should('contain', 'Ryhmä B')
|
||||
})
|
||||
|
||||
it('changes project length', () => {
|
||||
cy.get('[data-cy=edit-project-length-short]').check()
|
||||
cy.get('[data-cy=edit-group-save-button]').click()
|
||||
cy.get('.notification').should('have.text', 'Group updated!')
|
||||
|
||||
cy.get('[data-cy=edit-group-button]').eq(0).click()
|
||||
cy.get('[data-cy=edit-project-length-short]').should('be.checked')
|
||||
})
|
||||
|
||||
it('changes topic', () => {
|
||||
cy.get('.edit-group-form-topic__selector')
|
||||
.should('be.visible')
|
||||
|
||||
@@ -169,9 +169,21 @@ class SingleGroupEdit extends React.Component {
|
||||
fullWidth={true}
|
||||
/>
|
||||
<p>Change project length</p>
|
||||
<RadioGroup name="length" value={this.state.projectLength} onChange={this.handleProjectLengthChange}>
|
||||
<FormControlLabel value="short" control={<Radio />} label="short" />
|
||||
<FormControlLabel value="long" control={<Radio />} label="long" />
|
||||
<RadioGroup
|
||||
name="length"
|
||||
value={this.state.projectLength}
|
||||
onChange={this.handleProjectLengthChange}
|
||||
>
|
||||
<FormControlLabel
|
||||
value="short"
|
||||
control={<Radio inputProps={{ 'data-cy': 'edit-project-length-short' }} />}
|
||||
label="short"
|
||||
/>
|
||||
<FormControlLabel
|
||||
value="long"
|
||||
control={<Radio inputProps={{ 'data-cy': 'edit-project-length-long' }} />}
|
||||
label="long"
|
||||
/>
|
||||
</RadioGroup>
|
||||
<p>Add new students</p>
|
||||
<TextField
|
||||
|
||||
Reference in New Issue
Block a user