1
0
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:
Daniel Ruf
2019-05-02 11:08:41 +02:00
parent 9d7be476ad
commit d468ca7c5f
6 changed files with 57 additions and 1 deletions

1
test/acceptance/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
output

View 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');
});

View 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');
});

View 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.
});
}