1+ import ALL_COURSES from "../../../src/data/final_seattle_courses.json" ;
2+
13describe ( "CurriculumSelect" , ( ) => {
24 beforeEach ( ( ) => {
5+ cy . setCookie ( "archive-notice-seen" , "true" ) ;
36 cy . visit ( "/" ) ;
47 cy . get ( ".Header" ) . contains ( "New flow" ) . click ( ) ;
58 // eslint-disable-next-line cypress/no-unnecessary-waiting
@@ -10,12 +13,11 @@ describe("CurriculumSelect", () => {
1013 cy . get ( ".CurriculumSelect__select-input" ) . select ( "A A" ) ;
1114 cy . get ( ".CurriculumSelect" ) . contains ( "Get courses" ) . click ( ) ;
1215 cy . get ( ".NewFlowDialog" ) . should ( "not.exist" ) ;
13- cy . request ( "GET" , "localhost:3000/curricula/A%20A" ) . then ( resp => {
14- for ( const course of resp . body ) {
15- expect ( course . id ) . to . match ( / ^ A A \b / g) ;
16+ for ( const course of ALL_COURSES ) {
17+ if ( course . id . startsWith ( "A A" ) ) {
1618 cy . get ( `[data-id="${ course . id } "` ) ;
1719 }
18- } ) ;
20+ }
1921 } ) ;
2022 it ( "Generates a new curriculum flow with external prereqs" , ( ) => {
2123 cy . get ( ".CurriculumSelect__select-input" ) . select ( "A A" ) ;
@@ -42,15 +44,15 @@ describe("CurriculumSelect", () => {
4244 "not.exist" ,
4345 ) ;
4446 } ) ;
45- it ( "Displays Bothell curricula" , ( ) => {
47+ xit ( "Displays Bothell curricula" , ( ) => {
4648 cy . get ( ".CampusSelect__radio-label--bothell input" ) . check ( ) ;
4749 cy . get ( '.CurriculumSelect__select-input [value="A A"]' ) . should ( "not.exist" ) ;
4850 cy . get ( '.CurriculumSelect__select-input [value="B ARAB"]' ) ;
4951 cy . get ( '.CurriculumSelect__select-input [value="T ACCT"]' ) . should (
5052 "not.exist" ,
5153 ) ;
5254 } ) ;
53- it ( "Displays Tacoma curricula" , ( ) => {
55+ xit ( "Displays Tacoma curricula" , ( ) => {
5456 cy . get ( ".CampusSelect__radio-label--tacoma input" ) . check ( ) ;
5557 cy . get ( '.CurriculumSelect__select-input [value="A A"]' ) . should ( "not.exist" ) ;
5658 cy . get ( '.CurriculumSelect__select-input [value="T ACCT"]' ) ;
@@ -62,25 +64,25 @@ describe("CurriculumSelect", () => {
6264 cy . get ( ".CurriculumSelect__select-input" ) . select (
6365 "AES: American Ethnic Studies" ,
6466 ) ;
65- cy . get ( ".CampusSelect__radio-label--bothell input" ) . check ( ) ;
66- cy . get ( ".CurriculumSelect__select-input" ) . select ( "B BIO: Biology" ) ;
67- cy . get ( ".CampusSelect__radio-label--tacoma input" ) . check ( ) ;
68- cy . get ( ".CurriculumSelect__select-input" ) . select ( "T CHEM: Chemistry" ) ;
67+ // cy.get(".CampusSelect__radio-label--bothell input").check();
68+ // cy.get(".CurriculumSelect__select-input").select("B BIO: Biology");
69+ // cy.get(".CampusSelect__radio-label--tacoma input").check();
70+ // cy.get(".CurriculumSelect__select-input").select("T CHEM: Chemistry");
6971 cy . get ( ".CurriculumSelect__external-checkbox input" ) . check ( ) ;
7072 cy . get ( ".CurriculumSelect .AmbiguitySelect label" )
7173 . contains ( "Cautiously" )
7274 . click ( ) ;
7375 cy . get ( ".CloseButton" ) . click ( ) ;
7476 cy . get ( ".Header" ) . contains ( "New flow" ) . click ( ) ;
7577 cy . get ( ".CurriculumSelect" ) ;
76- cy . get ( ".CurriculumSelect__select-input" )
77- . find ( ":selected" )
78- . contains ( "T CHEM: Chemistry" ) ;
79- cy . get ( ".CampusSelect__radio-label--bothell input" ) . check ( ) ;
80- cy . get ( ".CurriculumSelect__select-input" )
81- . find ( ":selected" )
82- . contains ( "B BIO: Biology" ) ;
83- cy . get ( ".CampusSelect__radio-label--seattle input" ) . check ( ) ;
78+ // cy.get(".CurriculumSelect__select-input")
79+ // .find(":selected")
80+ // .contains("T CHEM: Chemistry");
81+ // cy.get(".CampusSelect__radio-label--bothell input").check();
82+ // cy.get(".CurriculumSelect__select-input")
83+ // .find(":selected")
84+ // .contains("B BIO: Biology");
85+ // cy.get(".CampusSelect__radio-label--seattle input").check();
8486 cy . get ( ".CurriculumSelect__select-input" )
8587 . find ( ":selected" )
8688 . contains ( "AES: American Ethnic Studies" ) ;
0 commit comments