forked from wlsf82/gitlab-cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Walmyr Filho
committed
Mar 6, 2020
1 parent
8e6799e
commit 3140bd6
Showing
1 changed file
with
23 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const faker = require('faker') | ||
|
||
describe('Create new page', () => { | ||
const project = { name: faker.random.uuid() } | ||
|
||
beforeEach(() => { | ||
cy.gui_login() | ||
cy.api_createProject(project) | ||
cy.visit(`${Cypress.env('user_name')}/${project.name}/wikis/home?view=create`) | ||
}) | ||
|
||
after(() => cy.api_deleteProjects()) | ||
|
||
it('successfully', () => { | ||
const wikiContent = faker.random.words(4) | ||
|
||
cy.get('.qa-wiki-content-textarea').type(wikiContent) | ||
cy.contains('Create page').click() | ||
|
||
cy.url().should('be.equal', `${Cypress.config('baseUrl')}${Cypress.env('user_name')}/${project.name}/wikis/home`) | ||
cy.get('[data-qa-selector="wiki_page_content"]').should('contain', wikiContent) | ||
}) | ||
}) |