|
17 | 17 | /* eslint-disable no-undef */ |
18 | 18 |
|
19 | 19 | context('Create Edit and Delete Route with redirect plugin', () => { |
20 | | - const name = `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDay()}`; |
21 | | - const newName = `${new Date().getFullYear()}*${new Date().getMonth() + 1}*${new Date().getDay()}`; |
| 20 | + const name = 'name'; |
| 21 | + const newName = 'newName'; |
22 | 22 |
|
23 | 23 | const selector = { |
24 | 24 | empty: '.ant-empty-normal', |
@@ -51,11 +51,12 @@ context('Create Edit and Delete Route with redirect plugin', () => { |
51 | 51 | it('should create route with custom redirect plugin', function () { |
52 | 52 | cy.visit('/'); |
53 | 53 | cy.contains('Route').click(); |
| 54 | + cy.get(selector.empty).should('be.visible'); |
54 | 55 | cy.contains('Create').click(); |
55 | 56 | cy.contains('Next').click().click(); |
56 | 57 | cy.get(selector.name).type(name); |
57 | 58 | cy.get(selector.redirect).click(); |
58 | | - cy.contains('Custom').click({ force: true }); |
| 59 | + cy.contains('Custom').click(); |
59 | 60 | // after choose Custom option, Custom Redirect form field should be visible |
60 | 61 | cy.get(selector.customRedirectLabel).should('be.visible'); |
61 | 62 | cy.get(selector.customRedirectUrI).should('be.visible'); |
@@ -98,6 +99,7 @@ context('Create Edit and Delete Route with redirect plugin', () => { |
98 | 99 | cy.contains(data.submitSuccess); |
99 | 100 | cy.contains('Goto List').click(); |
100 | 101 | cy.url().should('contains', 'routes/list'); |
| 102 | + cy.contains(newName).should('be.visible'); |
101 | 103 | }); |
102 | 104 |
|
103 | 105 | it('should delete the route', function () { |
|
0 commit comments