-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1048 from usagov/stage
Sprint 70 HOTFIX release
- Loading branch information
Showing
13 changed files
with
386 additions
and
164 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,43 @@ | ||
/// <reference types="cypress" /> | ||
import { pageObjects } from '../../support/pageObjects.js' | ||
|
||
describe('test for basic page', () => { | ||
|
||
beforeEach('visit site', () => { | ||
cy.signin(Cypress.env('roles').site_admin.username, Cypress.env('test_pass')) | ||
cy.visit('/node/add/page') | ||
}) | ||
|
||
it('test url alias', () => { | ||
|
||
cy.signin(Cypress.env('roles').site_admin.username, Cypress.env('test_pass')) | ||
|
||
|
||
// Can set url alias | ||
cy.visit('/node/add/page') | ||
cy.get('[data-drupal-selector="edit-title-0-value"]').type('Test Page') | ||
|
||
cy.get('[class="ck-blurred ck ck-content ck-editor__editable ck-rounded-corners ck-editor__editable_inline"]').then(field => { | ||
pageObjects | ||
.pageTitle() | ||
.type('Test Page') | ||
|
||
pageObjects | ||
.pageContent() | ||
.then(field => { | ||
cy.get(field[0]).clear().realType('test page') | ||
}) | ||
cy.get('[class="claro-details__summary claro-details__summary--accordion-item"]').then(dropdown => { | ||
|
||
pageObjects | ||
.pageDetails().then(dropdown => { | ||
cy.get(dropdown[1]).click() | ||
cy.get('[data-drupal-selector="edit-path-0"]').click() | ||
cy.get('[data-drupal-selector="edit-path-0-pathauto"]').click() | ||
cy.get('[data-drupal-selector="edit-path-0-alias"]').type('/cypress-url-alias-test') | ||
pageObjects | ||
.urlAlias().click() | ||
pageObjects | ||
.urlAuto().click() | ||
pageObjects | ||
.setAlias().type('/cypress-url-alias-test') | ||
}) | ||
cy.get('[data-drupal-selector="edit-submit"]').click() | ||
pageObjects | ||
.submitBtn().click() | ||
cy.url().should('contain', 'cypress-url-alias-test') | ||
|
||
cy.logout() | ||
|
||
}) | ||
}) | ||
}) |
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
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
Oops, something went wrong.