-
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.
Merge branch 'main' of https://github.com/feroline/demoQA-automation-…
- Loading branch information
Showing
5 changed files
with
128 additions
and
22 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import HomePage from '../../pages/HomePage'; | ||
import RadioButtonPage from '../../pages/Elements/RadioButtonPage'; | ||
|
||
const Home = new HomePage(); | ||
const RadioButton = new RadioButtonPage(); | ||
|
||
beforeEach(() => { | ||
cy.visitarToolsQA(); | ||
Home.elements().click(); | ||
RadioButton.radioBtnMenu(); | ||
}); | ||
|
||
describe('Partição Check - Validar os que foram checkados', () => { | ||
it('Marcar Yes', () => { | ||
RadioButton.yesByRadio().should('not.be.checked'); | ||
RadioButton.yesByLabel().click(); | ||
RadioButton.yesByRadio().should('be.checked'); | ||
}); | ||
|
||
it('Marcar Impressive', () => { | ||
RadioButton.impressiveByRadio().should('not.be.checked'); | ||
RadioButton.impressiveByLabel().click(); | ||
RadioButton.impressiveByRadio().should('be.checked'); | ||
}); | ||
|
||
it('Marcar No', () => { | ||
RadioButton.noByRadio().should('not.be.checked'); | ||
RadioButton.noByLabel().click(); | ||
RadioButton.noByRadio().should('not.be.checked').and('be.disabled'); | ||
}); | ||
}); | ||
|
||
describe('Partição Não Check - Validar os que não foram checkados', () => { | ||
it('Marcar Yes', () => { | ||
RadioButton.yesByLabel().click(); | ||
RadioButton.impressiveByRadio().should('not.be.checked'); | ||
RadioButton.noByRadio().should('not.be.checked'); | ||
}); | ||
|
||
it('Marcar Impressive', () => { | ||
RadioButton.impressiveByLabel().click(); | ||
RadioButton.yesByLabel().should('not.be.checked'); | ||
RadioButton.noByRadio().should('not.be.checked'); | ||
}); | ||
|
||
it('Marcar No', () => { | ||
RadioButton.noByLabel().click(); | ||
RadioButton.yesByLabel().should('not.be.checked'); | ||
RadioButton.impressiveByLabel().should('not.be.checked'); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
class RadioButtonPage { | ||
radioBtnMenu() { | ||
return cy.getItemMenu('Radio Button').click(); | ||
} | ||
|
||
yesByRadio() { | ||
return cy.get('#yesRadio'); | ||
} | ||
|
||
impressiveByRadio() { | ||
return cy.get('#impressiveRadio'); | ||
} | ||
|
||
noByRadio() { | ||
return cy.get('#noRadio'); | ||
} | ||
|
||
yesByLabel() { | ||
return cy.get('label[for="yesRadio"]'); | ||
} | ||
|
||
impressiveByLabel() { | ||
return cy.get('label[for="impressiveRadio"]'); | ||
} | ||
|
||
noByLabel() { | ||
return cy.get('label[for="noRadio"]'); | ||
} | ||
} | ||
|
||
export default RadioButtonPage; |
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,21 @@ | ||
enum CheckBoxText { | ||
HOME = 'Home', | ||
DESKTOP = 'Desktop', | ||
DOCUMENTS = 'Documents', | ||
DOWNLOADS = 'Downloads', | ||
NOTES = 'Notes', | ||
COMMANDS = 'Commands', | ||
WORKSPACE = 'WorkSpace', | ||
OFFICE = 'Office', | ||
WORD_FILE = 'Word File.doc', | ||
EXCEL_FILE = 'Excel File.doc', | ||
REACT = 'React', | ||
ANGULAR = 'Angular', | ||
VEU = 'Veu', | ||
PUBLIC = 'Public', | ||
PRIVATE = 'Private', | ||
CLASSIFIED = 'Classified', | ||
GENERAL = 'General', | ||
} | ||
|
||
export default CheckBoxText; |