mirror of
https://github.com/SomboChea/ui
synced 2026-01-12 06:05:43 +07:00
test: BDD / acceptance tests
Implement acceptance testing using codeceptjs and puppeteer.
This commit is contained in:
1
test/acceptance/.gitignore
vendored
Normal file
1
test/acceptance/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
output
|
||||
9
test/acceptance/Menu_test.js
Normal file
9
test/acceptance/Menu_test.js
Normal file
@@ -0,0 +1,9 @@
|
||||
Feature('Menu');
|
||||
|
||||
Scenario('check if we find the npm commands to set the registry', (I) => {
|
||||
I.amOnPage('http://localhost:8080');
|
||||
I.waitForElement('#header--button-registryInfo', 5);
|
||||
I.click('#header--button-registryInfo');
|
||||
I.waitForElement('#registryInfo--dialog-container');
|
||||
I.see('npm set registry http://localhost:8080');
|
||||
});
|
||||
10
test/acceptance/SearchResult_test.js
Normal file
10
test/acceptance/SearchResult_test.js
Normal file
@@ -0,0 +1,10 @@
|
||||
Feature('SearchResult');
|
||||
|
||||
Scenario('check if we get the "no results found" text', (I) => {
|
||||
I.amOnPage('http://localhost:8080');
|
||||
I.seeElement('header .react-autosuggest__input input');
|
||||
I.fillField('header .react-autosuggest__input input', 'test');
|
||||
I.waitForElement('header .react-autosuggest__suggestions-container');
|
||||
I.wait(1);
|
||||
I.see('No results found.', 'header .react-autosuggest__suggestions-container');
|
||||
});
|
||||
11
test/acceptance/steps_file.js
Normal file
11
test/acceptance/steps_file.js
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
// in this file you can append custom step methods to 'I' object
|
||||
|
||||
module.exports = function() {
|
||||
return actor({
|
||||
|
||||
// Define custom steps here, use 'this' to access default methods of I.
|
||||
// It is recommended to place a general 'login' function here.
|
||||
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user