-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix lecture edit page if active term is not set (#683)
* Add missing case that Term.active is nil * Add unit tests for lecture#stale? * Make lecture#older_than? method private * Add cypress test for lecture edit page * Make better use of .then() Co-authored-by: Splines <37160523+Splines@users.noreply.github.com> * Add docstring * Remove obsolete line * Rename for consistency * Add missing punctuation to docstring --------- Co-authored-by: Splines <37160523+Splines@users.noreply.github.com> Co-authored-by: Splines <dominic-plein@gmx.de>
- Loading branch information
1 parent
0d39b9e
commit 6d09e9e
Showing
5 changed files
with
78 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import FactoryBot from "../support/factorybot"; | ||
|
||
describe("Lecture edit page", () => { | ||
it("shows content tab button", function () { | ||
cy.createUserAndLogin("teacher").then((teacher) => { | ||
FactoryBot.create("lecture", "with_teacher_by_id", | ||
{ teacher_id: teacher.id }).as("lecture"); | ||
}); | ||
|
||
cy.then(() => { | ||
cy.visit(`/lectures/${this.lecture.id}/edit`); | ||
cy.getBySelector("content-tab-btn").should("be.visible"); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters