-
Notifications
You must be signed in to change notification settings - Fork 42
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
1 parent
56449e9
commit 407f2ef
Showing
4 changed files
with
308 additions
and
70 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,56 @@ | ||
package tests | ||
|
||
import ( | ||
"bytes" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
|
||
"go.k6.io/k6/cmd" | ||
k6tests "go.k6.io/k6/cmd/tests" | ||
) | ||
|
||
func TestCmd(t *testing.T) { | ||
t.Skip("data race") | ||
|
||
t.Parallel() | ||
|
||
ts := k6tests.NewGlobalTestState(t) | ||
|
||
ts.CmdArgs = []string{ | ||
"k6", "run", "-", | ||
} | ||
ts.Stdin = bytes.NewBufferString(` | ||
import { browser } from 'k6/browser'; | ||
export const options = { | ||
scenarios: { | ||
browser: { | ||
executor: 'shared-iterations', | ||
options: { | ||
browser: { | ||
type: 'chromium', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}; | ||
export default async function () { | ||
const page = await browser.newPage(); | ||
await page.goto('https://test.k6.io/browser.php'); | ||
const options = page.locator('#numbers-options'); | ||
await options.selectOption({label:'Five'}); | ||
await options.selectOption({index:5}); | ||
await options.selectOption({value:'five'}); | ||
await options.selectOption({label:'Five'}); | ||
await options.selectOption('Five'); // Value or label | ||
await options.selectOption([{label:'Five'}]); | ||
await options.selectOption(['Five']); // Value or label | ||
} | ||
`) | ||
cmd.ExecuteWithGlobalState(ts.GlobalState) | ||
|
||
assert.Empty(t, ts.Stderr.String()) | ||
} |
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.