@@ -44,22 +44,16 @@ describe('Test in frontend that the contact site router', () => {
4444 expect ( response . redirectedToUrl ) . to . match ( new RegExp ( `${ url } $` ) ) ;
4545 } ) ;
4646 cy . request ( { url : `/index.php?option=com_contact&view=contact&id=${ contact . id } -${ contact . alias } ` , followRedirect : false } ) . then ( ( response ) => {
47- // @TODO : The following line is just a temporary fix. Remove it and uncomment the 2 lines after it when done.
48- expect ( response . status ) . to . eq ( 200 ) ;
49- // expect(response.status).to.eq(301);
50- // expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
47+ expect ( response . status ) . to . eq ( 301 ) ;
48+ expect ( response . redirectedToUrl ) . to . match ( new RegExp ( `${ url } $` ) ) ;
5149 } ) ;
5250 cy . request ( { url : `/index.php?option=com_contact&view=contact&id=${ contact . id } &catid=${ contact . catid } ` , followRedirect : false } ) . then ( ( response ) => {
53- // @TODO : The following line is just a temporary fix. Remove it and uncomment the 2 lines after it when done.
54- expect ( response . status ) . to . eq ( 200 ) ;
55- // expect(response.status).to.eq(301);
56- // expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
51+ expect ( response . status ) . to . eq ( 301 ) ;
52+ expect ( response . redirectedToUrl ) . to . match ( new RegExp ( `${ url } $` ) ) ;
5753 } ) ;
5854 cy . request ( { url : `/index.php?option=com_contact&view=contact&id=${ contact . id } -${ contact . alias } &catid=${ contact . catid } ` , followRedirect : false } ) . then ( ( response ) => {
59- // @TODO : The following line is just a temporary fix. Remove it and uncomment the 2 lines after it when done.
60- expect ( response . status ) . to . eq ( 200 ) ;
61- // expect(response.status).to.eq(301);
62- // expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
55+ expect ( response . status ) . to . eq ( 301 ) ;
56+ expect ( response . redirectedToUrl ) . to . match ( new RegExp ( `${ url } $` ) ) ;
6357 } ) ;
6458
6559 cy . visit ( url ) ;
@@ -87,10 +81,8 @@ describe('Test in frontend that the contact site router', () => {
8781 expect ( response . redirectedToUrl ) . to . match ( new RegExp ( `${ url } $` ) ) ;
8882 } ) ;
8983 cy . request ( { url : `/index.php?option=com_contact&view=contact&id=${ contact . id } -${ contact . alias } &catid=${ contact . catid } ` , followRedirect : false } ) . then ( ( response ) => {
90- // @TODO : The following line is just a temporary fix. Remove it and uncomment the 2 lines after it when done.
91- expect ( response . status ) . to . eq ( 200 ) ;
92- // expect(response.status).to.eq(301);
93- // expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
84+ expect ( response . status ) . to . eq ( 301 ) ;
85+ expect ( response . redirectedToUrl ) . to . match ( new RegExp ( `${ url } $` ) ) ;
9486 } ) ;
9587
9688 cy . visit ( url . split ( '/' ) . slice ( 0 , - 1 ) . join ( '/' ) ) ;
0 commit comments